Part Number Hot Search : 
1N826UR MX8335MC 30KP10A 17N80 00022 T3906 0N60C KDV153
Product Description
Full Text Search
 

To Download DSPIC33EP128GM710 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  ? 2013-2014 microchip technology inc. ds70000689d-page 1 dspic33epxxxgm3xx/6xx/7xx operating conditions 3.0v to 3.6v, -40c to +85c, up to 70 mips 3.0v to 3.6v, -40c to +125c, up to 60 mips core: 16-bit dspic33e cpu code-efficient (c and assembly) architecture two 40-bit wide accumulators single-cycle (mac/mpy) with dual data fetch single-cycle mixed-sign mul plus hardware divide 32-bit multiply support clock management internal fast frc oscillator with 1% accuracy programmable plls and oscillator clock sources fail-safe clock monitor (fscm) independent watchdog timer (wdt) fast wake-up and start-up power management low-power management modes (sleep, idle, doze) executing optimized nop string with flash fetch integrated power-on reset and brown-out reset 0.6 ma/mhz dynamic current (typical) 30 a i pd current (typical) high-speed pwm up to 12 pwm outputs (six generators) primary master time base inputs allow time base synchronization from internal/external sources dead time for rising and falling edges 7.14 ns pwm resolution pwm support for: - dc/dc, ac/dc, inverters, pfc, lighting - bldc, pmsm, acim, srm programmable fault inputs flexible trigger configurations for adc conversions supports pwm lock, pwm output chopping and dynamic phase shifting advanced analog features two independent adc modules: - configurable as 10-bit, 1.1 msps with four s&h or 12-bit, 500 ksps with one s&h - 11, 13, 18, 30 or 49 analog inputs flexible and independent adc trigger sources up to four op amp/comparators with direct connection to the adc module: - additional dedicated comparator - programmable references with 32 voltage points - programmable blanking and filtering charge time measurement unit (ctmu): - supports mtouch? capacitive touch sensing - provides high-resolution time measurement (1 ns) - on-chip temperature measurement timers/output compare/input capture 21 general purpose timers: - nine 16-bit and up to four 32-bit timers/counters - eight output capture modules configurable as timers/counters - ptg module with two configurable timers/counters - two 32-bit quadrature encoder interface (qei) modules configurable as a timer/counter eight input capture modules peripheral pin select (pps) to allow function remap peripheral trigger generator (ptg) for scheduling complex sequences communication interfaces four enhanced addressable uart modules (17.5 mbps): - with support for lin/j2602 protocols and irda ? three 3-wire/4-wire spi modules (15 mbps) 25 mbps data rate for dedicated spi module (with no pps) two i 2 c? modules (up to 1 mbps) with smbus support two can modules (1 mbps) with can 2.0b support programmable cyclic redundancy check (crc) codec interface module (dci) with i 2 s support direct memory access (dma) 4-channel dma with user-selectable priority arbitration peripherals supported by the dma controller include: - uart, spi, adc, can and input capture - output compare and timers input/output sink/source 15 ma or 10 ma, pin-specific for standard v oh /v ol 5v tolerant pins selectable open-drain, pull-ups and pull-downs up to 5 ma overvoltage clamp current change notice interrupts on all i/o pins pps to allow function remap qualification and class b support aec-q100 revg (grade 1, -40c to +125c) planned aec-q100 revg (grade 0, -40c to +150c) planned class b safety library, iec 60730 debugger development support in-circuit and in-application programming three complex and five simple breakpoints ieee 1149.2 compatible (jtag) boundary scan trace and run-time watch 16-bit digital signal controll ers with high-speed pwm, op amps and advanced analog features downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 2 ? 2013-2014 microchip technology inc. dspic33epxxxgm3xx/6xx/7xx product family the device names, pin counts, memory sizes and peripheral availability of each device are listed in table 1 . their pinout diagrams appear on the following pages. table 1: dspic33epxxxgm3xx/6xx/7xx family devices device program flash memory (kbytes) ram (kbytes) remappable peripherals i 2 c? crc generator adc 10-bit/12-bit adc (channels) op amps/comparators ctmu ptg pmp rtcc i/o pins pins packages can 16-bit/32-bit timers input capture output compare motor control pwm (channels) qei uart spi ( 1 ) dci external interrupts ( 2 ) dspic33ep128gm304 128 16 0 9/4 8 8 12 2 4 3 1 5 2 1 2 18 4/5 1 yes no no 35 44 tqfp, qfn dspic33ep128gm604 2 dspic33ep256gm304 256 32 0 dspic33ep256gm604 2 dspic33ep512gm304 512 48 0 dspic33ep512gm604 2 dspic33ep128gm306 128 16 0 9/4 8 8 12 2 4 3 1 5 2 1 2 30 4/5 1 yes yes yes 53 64 tqfp, qfn dspic33ep128gm706 2 dspic33ep256gm306 256 32 0 dspic33ep256gm706 2 dspic33ep512gm306 512 48 0 dspic33ep512gm706 2 dspic33ep128gm310 128 16 0 9/48 8122 4 3 1 5 2 1 2494/5 1 yesyesyes85 100/ 121 tqfp, tfbga DSPIC33EP128GM710 2 dspic33ep256gm310 256 32 0 dspic33ep256gm710 2 dspic33ep512gm310 512 48 0 dspic33ep512gm710 2 note 1: only spi2 and spi3 are remappable. 2: int0 is not remappable. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 3 dspic33epxxxgm3xx/6xx/7xx pin diagrams 44-pin tqfp (1,2) = pins are up to 5v tolerant 4443 42 41 40 39 38 37 36 35 34 1 33 2 32 33 1 4 30 52 9 6 28 72 7 8 26 92 5 10 24 11 23 1213 14 15 16 17 18 19 20 21 22 tck/an26/cv ref1o /ascl1/rp40/t4ck/rb8 tdo/pwm4h/ra10 rpi45/pwm2l/ctpls/rb13 pgec1/oa1in+/an4/c1in3-/c1in1+/c2in3-/rpi34/rb2 pged1/oa1in-/an5/c1in1-/ctmuc/rp35/rb3 oa3out/an6/c3in4-/c4in4-/c4in1+/rp48/ocfb/rc0 oa3in-/an7/c3in1-/c4in1-/rp49/rc1 oa4in+/an8/c3in3-/c3in1+/rpi50/u1rts /bclk1/flt3/rc2 v dd v ss an32/osc1/clki/rpi18/ra2 osc2/clko/rpi19/ra3 sda2/rpi24/ra8 flt32/scl2/rp36/rb4 tdi/pwm4l/ra7 rpi46/pwm1h/t3ck/t7ck/rb14 rpi47/pwm1l/t5ck/t6ck/rb15 av ss av dd mclr oa2out/an0/c2in4-/c5in2-/c4in3-/rpi16/ra0 oa2in+/an1/c2in1+/rpi17/ra1 pged3/v ref -/oa2in-/an2/c2in1-/ss1 /rpi32/cted2/rb0 pgec3/v ref +/cv ref +/oa1out/an3/c1in4-/c4in2-/rpi33/cted1/rb1 rpi44/pwm2h/rb12 rp43/pwm3l/rb11 rp42/pwm3h/rb10 v cap v ss rp57/pwm5l/rc9 rp56/pwm5h/rc8 rp55/pwm6l/rc7 rp54/pwm6h/rc6 tms/oa5in-/an27/c5in1-/rp41/rb9 oa5out/an25/c5in4-/rp39/int0/rb7 pgec2/ascl2/rp38/rb6 pged2/asda2/rp37/rb5 v dd v ss an31/cv ref2o /scl1/rpi53/rc5 an30/sda1/rpi52/rc4 an29/sck1/rpi51/rc3 an28/asda1/sdi1/rpi25/ra9 oa5in+/an24/c5in3-/c5in1+/sdo1/rp20/t1ck/ra4 note 1: the rpn/rpin pins can be used by any remapp able peripheral with some limitation. see section 11.4 peripheral pin select (pps) for available peripherals and for information on limitations. 2: every i/o port pin (rax-rgx) can be used as a change notification pin (cnax-cngx). see section 11.0 i/o ports for more information. dspic33epxxxgm304/604 downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 4 ? 2013-2014 microchip technology inc. pin diagrams (continued) 44-pin qfn (1,2,3) = pins are up to 5v tolerant 44 43 42 41 40 39 38 37 36 35 12 13 14 15 16 17 18 19 20 21 3 30 29 28 27 26 25 24 23 4 5 7 8 9 10 11 1 2 32 31 6 22 33 34 note 1: the rpn/rpin pins can be used by any rem appable peripheral with some limitation. see section 11.4 peripheral pin select (pps) for available peripherals and for information on limitations. 2: every i/o port pin (rax-rgx) can be used as a change notification pin (cnax-cngx). see section 11.0 i/o ports for more information. 3: the metal pad at the bottom of the device is not connec ted to any pins and is recommended to be connected to v ss externally. dspic33epxxxgm304/604 tck/an26/cv ref1o /ascl1/rp40/t4ck/rb8 tdo/pwm4h/ra10 rpi45/pwm2l/ctpls/rb13 pgec1/oa1in+/an4/c1in3-/c1in1+/c2in3-/rpi34/rb2 pged1/oa1in-/an5/c1in1-/ctmuc/rp35/rb3 oa3out/an6/c3in4-/c4in4-/c4in1+/rp48/ocfb/rc0 oa3in-/an7/c3in1-/c4in1-/rp49/rc1 oa3in+/an8/c3in3-/c3in1+/rpi50/u1rts /bclk1/flt3/rc2 v dd v ss an32/osc1/clki/rpi18/ra2 osc2/clko/rpi19/ra3 sda2/rpi24/ra8 flt32/scl2/rp36/rb4 tdi/pwm4l/ra7 rpi46/pwm1h/t3ck/t7ck/rb14 rpi47/pwm1l/t5ck/t6ck/rb15 av ss av dd mclr oa2out/an0/c2in4-/c4in3-/rpi16/ra0 oa2in+/an1/c2in1+/rpi17/ra1 pged3/v ref -/oa2in-/an2/c2in1-/ss1 /rpi32/cted2/rb0 pgec3/v ref +/cv ref +/oa1out/an3/c1in4-/c4in2-/rpi33/cted1/rb1 rpi44/pwm2h/rb12 rp43/pwm3l/rb11 rp42/pwm3h/rb10 v cap v ss rp57/pwm5l/rc9 rp56/pwm5h/rc8 rp55/pwm6l/rc7 rp54/pwm6h/rc6 pgec2/ascl2/rp38/rb6 pged2/asda2/rp37/rb5 v dd v ss an30/sda1/rpi52/rc4 an29/sck1/rpi51/rc3 an28/asda1/sdi1/rpi25/ra9 oa5in+/an24/c5in3-/c5in1+/sdo1/rp20/t1ck/ra4 oa5out/an25/c5in4-/rp39/int0/rb7 an31/cv ref2o /scl1/rpi53/rc5 tms/oa5in-/an27/c5in1-/rp41/rb9 downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 5 dspic33epxxxgm3xx/6xx/7xx pin diagrams (continued) 64-pin tqfp (1,2,3) = pins are up to 5v tolerant note 1: the rpn/rpin pins can be used by any remappable peripheral with some limitation. see section 11.4 peripheral pin select (pps) for available peripherals and for information on limitations. 2: every i/o port pin (rax-rgx) can be used as a change notification pin (cnax-cngx). see section 11.0 i/o ports for more information. 3: this pin is not available as an input when opmode (cmxcon<10>) = 1 . dspic33ep128gm306/706 dspic33ep256gm306/706 dspic33ep512gm306/706 6463 62 61 60 59 58 57 56 55 54 53 52 51 50 49 1 48 2 47 3 46 4 45 5 44 6 43 7 42 8 41 9 40 10 39 11 38 12 37 13 36 14 35 15 34 16 33 1718 19 20 21 22 23 24 25 26 27 28 29 30 31 32 tdi/pwm4l/pmd5/ra7 rpi46/pwm1h/t3ck/t7ck/pmd6/rb14 rpi47/pwm1l/t5ck/t6ck/pmd7/rb15 an19/rp118/pma5/rg6 an18/ascl1/rpi119/pma4/rg7 an17/asda1/rp120/pma3/rg8 mclr an16/rpi121/pma2/rg9 v ss v dd an10/rpi28/ra12 an9/rpi27/ra11 oa2out/an0/c2in4-/c4in3-/rpi16/ra0 oa2in+/an1/c2in1+/rpi17/ra1 pged3/v ref -/oa2in-/an2/c2in1-/ss1 /rpi32/cted2/rb0 pgec3/v ref +/cv ref +/oa1out/an3/c1in4-/c4in2-/rpi33/cted1/rb1 tdo/pwm4h/pmd4/ra10 rpi45/pwm2l/ctpls/pmd3/rb13 rpi44/pwm2h/pmd2/rb12 rp43/pwm3l/pmd1/rb11 rp42/pwm3h/pmd0/rb10 rp97/rf1 rpi96/rf0 v dd v cap rp57/pwm5l/rc9 rp70/rd6 rp69/pmrd/rd5 rp56/pwm5h/pmwr/rc8 rp55/pwm6l/pmbe/rc7 rp54/pwm6h/rc6 tms/oa5in-/an27/c5in4-/rp41/rb9 tck/an26/cv ref1o /sosco/rp40/t4ck/rb8 sosci/rpi61/rc13 oa5out/an25/c5in4-/rp39/int0/rb7 an48/cv ref2o /rpi58/pmcs1/rc10 pgec2/ascl2/rp38/pmcs2/rb6 pged2/asda2/rp37/rb5 rpi72/rd8 v ss osc2/clko/rpi63/rc15 an49/osc1/clki/rpi60/rc12 v dd an31/scl1/rpi53/rc5 an30/sda1/rpi52/rc4 an29/sck1/rpi51/rc3 an28/sdi1/rpi25/ra9 oa5in+/an24/c5in3-/c5in1+/sdo1/rp20/t1ck/ra4 pgec1/oa1in+/an4/c1in3-/c1in1+/c2in3-/rpi34/rb2 pged1/oa1in-/an5/c1in1-/(ctmuc)/rp35/rtcc/rb3 av dd av ss oa3out/an6/c3in4-/c4in1+/rp48/ocfb/rc0 oa3in-/an7/c3in1-/c4in1-/rp49/rc1 oa3in+/an8/c3in3-/c3in1+/rpi50/u1rts /bclk1/flt3/rc2 an11/c1in2-/u1cts /flt4/pma12/rc11 v ss v dd an12/c2in2-/c5in2-/u2rts /bclk2/flt5/pma11/re12 an13/c3in2-/u2cts /flt6/pma10/re13 an14/rpi94/flt7/pma1/re14 an15/rpi95/flt8/pma0/re15 sda2/rpi24/pma9/ra8 flt32/scl2/rp36/pma8/rb4 downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 6 ? 2013-2014 microchip technology inc. pin diagrams (continued) 64-pin qfn (1,2,3,4) = pins are up to 5v tolerant note 1: the rpn/rpin pins can be used by any rema ppable peripheral with some limitation. see section 11.4 peripheral pin select (pps) for available peripherals and for information on limitations. 2: every i/o port pin (rax-rgx) can be used as a change notification pin (cnax-cngx). see section 11.0 i/o ports for more information. 3: this pin is not available as an input when opmode (cmxcon<10>) = 1 . 4: the metal pad at the bottom of the device is not connected to any pins and is recommended to be connected to v ss externally. dspic33ep128gm306/706 dspic33ep256gm306/706 dspic33ep512gm306/706 6463 62 61 60 59 58 57 56 55 54 53 52 51 50 49 1 48 2 47 3 46 4 45 5 44 6 43 7 42 8 41 9 40 10 39 11 38 12 37 13 36 14 35 15 34 16 33 1718 19 20 21 22 23 24 25 26 27 28 29 30 31 32 tdo/pwm4h/pmd4/ra10 rpi45/pwm2l/ctpls/pmd3/rb13 rpi44/pwm2h/pmd2/rb12 rp43/pwm3l/pmd1/rb11 rp42/pwm3h/pmd0/rb10 rp97/rf1 rpi96/rf0 v dd v cap rp57/pwm5l/rc9 rp70/rd6 rp69/pmrd/rd5 rp56/pwm5h/pmwr/rc8 rp55/pwm6l/pmbe/rc7 rp54/pwm6h/rc6 tck/an26/cv ref1o /sosco/rp40/t4ck/rb8 sosci/rpi61/rc13 oa5out/an25/c5in4-/rp39/int0/rb7 an48/cv ref2o /rpi58/pmcs1/rc10 pgec2/ascl2/rp38/pmcs2/rb6 pged2/asda2/rp37/rb5 rpi72/rd8 v ss osc2/clko/rpi63/rc15 an49/osc1/clki/rpi60/rc12 v dd an31/scl1/rpi53/rc5 an30/sda1/rpi52/rc4 an29/sck1/rpi51/rc3 an28/sdi1/rpi25/ra9 oa5in+/an24/c5in3-/c5in1+/sdo1/rp20/t1ck/ra4 pgec1/oa1in+/an4/c1in3-/c1in1+/c2in3-/rpi34/rb2 pged1/oa1in-/an5/c1in1-/(ctmuc)/rp35/rtcc/rb3 av dd av ss oa3out/an6/c3in4-/c4in4-/c4in1+/rp48/ocfb/rc0 oa3in-/an7/c3in1-/c4in1-/rp49/rc1 oa3in+/an8/c3in3-/c3in1+/rpi50/u1rts /bclk1/flt3/rc2 an11/c1in2-/u1cts /flt4/pma12/rc11 v ss v dd an12/c2in2-/c5in2-/u2rts /bclk2/flt5/pma11/re12 an13/c3in2-/u2cts /flt6/pma10/re13 an14/rpi94/flt7/pma1/re14 an15/rpi95/flt8/pma0/re15 sda2/rpi24/pma9/ra8 flt32/scl2/rp36/pma8/rb4 tdi/pwm4l/pmd5/ra7 rpi46/pwm1h/t3ck/t7ck/pmd6/rb14 rpi47/pwm1l/t5ck/t6ck/pmd7/rb15 an19/rp118/pma5/rg6 an18/ascl1/rpi119/pma4/rg7 an17/asda1/rp120/pma3/rg8 mclr an16/rpi121/pma2/rg9 v ss v dd an10/rpi28/ra12 an9/rpi27/ra11 oa2out/an0/c2in4-/c4in3-/rpi16/ra0 oa2in+/an1/c2in1+/rpi17/ra1 pged3/v ref -/oa2in-/an2/c2in1-/ss1 /rpi32/cted2/rb0 pgec3/v ref +/cv ref +/oa1out/an3/c1in4-/c4in2-/rpi33/cted1/rb1 tms/oa5in-/an27/c5in1-/rp41/rb9 downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 7 dspic33epxxxgm3xx/6xx/7xx pin diagrams (continued) 100-pin tqfp (1,2,3) = pins are up to 5v tolerant note 1: the rpn/rpin pins can be used by any re mappable peripheral with some limitation. see section 11.4 peripheral pin select (pps) for available peripherals and for information on limitations. 2: every i/o port pin (rax-rgx) can be used as a change notification pin (cnax-cngx). see section 11.0 i/o ports for more information. 3: this pin is not available as an input when opmode (cmxcon<10>) = 1 . dspic33ep128gm310/710 dspic33ep256gm310/710 dspic33ep512gm310/710 75 100 1 26 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 74 73 72 71 70 69 68 67 66 65 64 63 62 61 60 59 58 57 56 55 54 53 52 51 99 98 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 81 80 79 78 77 76 pgec1/oa1in+/an4/c1in3-/c1in1+/c2in3-/rpi34/rb2 pged1/oa1in-/an5/c1in1-/ctmuc/rp35/rtcc/rb3 v ref -/an33/pma6/rf9 v ref +/an34/pma7/rf10 av dd av ss oa3out/an6/c3in4-/c4in4-/c4in1+/rp48/ocfb/rc0 oa3in-/an7/c3in1-/c4in1-/rp49/rc1 oa3in+/an8/c3in3-/c3in1+/rpi50/u1rts /bclk1/flt3/rc2 an11/c1in2-/u1cts /flt4/pma12/rc11 v ss v dd an35/rg11 an36/rf13 an37/rf12 an12/c2in2-/c5in2-/u2rts /bclk2/flt5/pma11/re12 an13/c3in2-/u2cts /flt6/pma10/re13 an14/rpi94/flt7/pma1/re14 an15/rpi95/flt8/pma0/re15 v ss v dd an38/rd14 an39/rd15 sda2/rpi24/pma9/ra8 flt32/scl2/rp36/pma8/rb4 tdi/pwm4l/pmd5/ra7 rpi47/pwm1l/t5ck/t6ck/pmd7/rb15 an19/rp118/pma5/rg6 an18/ascl1/rpi119/pma4/rg7 an17/asda1/rp120/pma3/rg8 mclr an16/rpi121/pma2/rg9 v dd an10/rpi28/ra12 an9/rpi27/ra11 oa2out/an0/c2in4-/c4in3-/rpi16/ra0 oa2in+/an1/c2in1+/rpi17/ra1 pged3/oa2in-/an2/c2in1-/ss1 /rpi32/cted2/rb0 pgec3/cv ref +/oa1out/an3/c1in4-/c4in2-/rpi33/cted1/rb1 v ss rpi46/pwm1h/t3ck/t7ck/pmd6/rb14 v dd an22/rg10 an21/re8 an20/re9 an23/rp127/rg15 pwm5l/rd1 pwm5h/rd2 pwm6l/t9ck/rd3 pwm6h/t8ck/rd4 v ss tck/an26/cv ref1o /sosco/rp40/t4ck/rb8 sosci/rpi61/rc13 oa5out/an25/c5in4-/rp39/int0/rb7 an48/cv ref2o /rpi58/pmcs1/rc10 pgec2/ascl2/rp38/pmcs2/rb6 pged2/asda2/rp37/rb5 rpi72/rd8 an47/int4/ra15 an46/int3/ra14 v ss osc2/clko/rpi63/rc15 an49/osc1/clki/rpi60/rc12 v dd an45/rf5 an44/rf4 an43/rg3 an42/rg2 tdo/pwm4h/pmd4/ra10 rpi45/pwm2l/ctpls/pmd3/rb13 rpi44/pwm2h/pmd2/rb12 rpi124/rg12 rp126/rg14 rp43/pwm3l/pmd1/rb11 rp42/pwm3h/pmd0/rb10 rf7 rf6 rpi112/rg0 rp113/rg1 rp97/rf1 rpi96/rf0 v dd v cap rp57/rc9 rp70/rd6 rp69/pmrd/rd5 rp56/pmwr/rc8 rpi77/rd13 rpi76/rd12 rp55/pmbe/rc7 rp54/rc6 tms/oa5in-/an27/c5in1-/rp41/rb9 an31/scl1/rpi53/rc5 an30/sda1/rpi52/rc4 an41/rp81/re1 an40/rpi80/re0 oa5in+/an24/c5in3-/c5in1+/sdo1/rp20/t1ck/ra4 an29/sck1/rpi51/rc3 an28/sdi1/rpi25/ra9 rp125/rg13 downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 8 ? 2013-2014 microchip technology inc. pin diagrams (continued) 121-pin tfbga (1) = pins are up to 5v tolerant dspic33ep128gm310/710 dspic33ep256gm310/710 dspic33ep512gm310/710 note 1: refer to table 2 for full pin names. 1234567891 01 1 a ra10 rb13 rg13 rb10 rg0 rf1 v dd nc rd12 rc6 rb9 b nc rg15 rb12 rb11 rf7 rf0 v cap rd5 rc7 v ss rb8 c rb14 v dd rg12 rg14 rf6 nc rc9 rc8 nc rc13 rc10 d rd1 rb15 ra7 nc nc nc rd6 rd13 rb7 nc rb6 e rd4 rd3 rg6 rd2 nc rg1 nc ra15 rd8 rb5 ra14 f mclr rg8 rg9 rg7 v ss nc nc v dd rc12 v ss rc15 g re8 re9 rg10 nc v dd v ss v ss nc rf5 rg3 rf4 h ra12 ra11 nc nc nc v dd nc ra9 rc3 rc5 rg2 j ra0 ra1 rb3 av dd rc11 rg11 re12 nc nc re1 rc4 k rb0 rb1 rf10 rc0 nc rf12 re14 v dd rd15 ra4 re0 l rb2 rf9 av ss rc1 rc2 rf13 re13 re15 rd14 ra8 rb4 downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 9 dspic33epxxxgm3xx/6xx/7xx table 2: pin names: dspic33ep128/256/512gm310/710 devices ( 1 , 2 , 3 ) pin # full pin name pin # full pin name a1 tdo/pwm4h/pmd4/ra10 e8 an47/int4/ra15 a2 rpi45/pwm2l/ctpls/pmd3/rb13 e9 rpi72/rd8 a3 rp125/rg13 e10 pged2/asda2/rp37/rb5 a4 rp42/pwm3h/pmd0/rb10 e11 an46/int3/ra14 a5 rpi112/rg0 f1 mclr a6 rp97/rf1 f2 an17/asda1/rp120/pma3/rg8 a7 v dd f3 an16/rpi121/pma2/rg9 a8 no connect f4 an18/ascl1/rpi119/pma4/rg7 a9 rpi76/rd12 f5 v ss a10 rp54/rc6 f6 no connect a11 tms/oa5in-/an27/c5in1-/rp41/rb9 f7 no connect b1 no connect f8 v dd b2 an23/rp127/rg15 f9 an49/osc1/clki/rpi60/rc12 b3 rpi44/pwm2h/pmd2/rb12 f10 v ss b4 rp43/pwm3l/pmd1/rb11 f11 osc2/clko/rpi63/rc15 b5 rf7 g1 an21/re8 b6 rpi96/rf0 g2 an20/re9 b7 v cap g3 an22/rg10 b8 rp69/pmrd/rd5 g4 no connect b9 rp55/pmbe/rc7 g5 v dd b10 v ss g6 v ss b11 tck/an26/cv ref1o /sosco/rp40/t4ck/rb8 g7 v ss c1 rpi46/pwm1h/t3ck/t7ck/pmd6/rb14 g8 no connect c2 v dd g9 an45/rf5 c3 rpi124/rg12 g10 an43/rg3 c4 rp126/rg14 g11 an44/rf4 c5 rf6 h1 an10/rpi28/ra12 c6 no connect h2 an9/rpi27/ra11 c7 rp57/rc9 h3 no connect c8 rp56/pmwr/rc8 h4 no connect c9 no connect h5 no connect c10 sosci/rpi61/rc13 h6 v dd c11 an48/cv ref2o /rpi58/pmcs1/rc10 h7 no connect d1 pwm5l/rd1 h8 an28/sdi1/rpi25/ra9 d2 rpi47/pwm1l/t5ck/t6ck/pmd7/rb15 h9 an29/sck1/rpi51/rc3 d3 tdi/pwm4l/pmd5/ra7 h10 an31/scl1/rpi53/rc5 d4 no connect h11 an42/rg2 d5 no connect j1 oa2out/an0/c2in4-/c4in3-/rpi16/ra0 d6 no connect j2 oa2in+/an1/c2in3-/c2in1+/rpi17/ra1 d7 rp70/rd6 j3 pged1/oa1in-/an5/c1in1-/ctmuc/rp35/rtcc/rb3 d8 rpi77/rd13 j4 av dd d9 oa5out/an25/c5in4-/rp39/int0/rb7 j5 an11/c1in2-/u1cts /flt4/pma12/rc11 d10 no connect j6 an35/rg11 d11 pgec2/ascl2/rp38/pmcs2/rb6 j7 an12/c2in2-/c5in2-/u2rts /bclk2/flt5/pma11/re12 note 1: the rpn/rpin pins can be used by any remappable peripheral with some limitation. see section 11.4 peripheral pin select (pps) for available peripherals and for information on limitations. 2: every i/o port pin (rax-rgx) can be used as a change notification pin (cnax-cngx). see section 11.0 i/o ports for more information. 3: the availability of i 2 c? interfaces varies by device. selection (sdax/sclx or asdax/asclx) is made using the device conf iguration bits, alti2c1 and alti2c2 (fpor<5:4>). see section 30.0 special features for more information. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 10 ? 2013-2014 microchip technology inc. e1 pwm6h/t8ck/rd4 j8 no connect e2 pwm6l/t9ck/rd3 j9 no connect e3 an19/rp118/pma5/rg6 j10 an41/rp81/re1 e4 pwm5h/rd2 j11 an30/sda1/rpi52/rc4 e5 no connect k1 pged3/oa2in-/an2/c2in1-/ss1 /rpi32/cted2/rb0 e6 rp113/rg1 k2 pgec3/cv ref +/oa1out/an3/c1in4-/c4in2-/rpi33/ cted1/rb1 e7 no connect k3 v ref +/an34/pma7/rf10 k4 oa3out/an6/c3in4-/c4in4-/c4in1+/rp48/ocfb/rc0 l3 av ss k5 no connect l4 oa3in-/an7/c3in1-/c4in1-/rp49/rc1 k6 an37/rf12 l5 oa3in+/an8/c3in3-/c3in1+/rpi50/u1rts /bclk1/flt3/ pma13/rc2 k7 an14/rpi94/flt7/pma1/re14 l6 an36/rf13 k8 v dd l7 an13/c3in2-/u2cts /flt6/pma10/re13 k9 an39/rd15 l8 an15/rpi95/flt8/pma0/re15 k10 oa5in+/an24/c5in3-/c5in1+/sdo1/rp20/t1ck/ra4 l9 an38/rd14 k11 an40/rpi80/re0 l10 sda2/rpi24/pma9/ra8 l1 pgec1/oa1in+/an4/c1in3-/c1in1+/c2in3-/rpi34/rb2 l11 flt32/scl2/rp36/ pma8/rb4 l2 v ref -/an33/pma6/rf9 table 2: pin names: dspic33ep128/256/512gm310/710 devices ( 1 , 2 , 3 ) (continued) pin # full pin name pin # full pin name note 1: the rpn/rpin pins can be used by any remappable peripheral with some limitation. see section 11.4 peripheral pin select (pps) for available peripherals and for information on limitations. 2: every i/o port pin (rax-rgx) can be used as a change notification pin (cnax-cngx). see section 11.0 i/o ports for more information. 3: the availability of i 2 c? interfaces varies by device. selection (sdax/sclx or asdax/asclx) is made using the device conf iguration bits, alti2c1 and alti2c2 (fpor<5:4>). see section 30.0 special features for more information. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 11 dspic33epxxxgm3xx/6xx/7xx table of contents dspic33epxxxgm3xx/6xx/7xx product family ............................... ................................................... ..... ......................................... 2 1.0 device overview ....................................................... ...................................................... ........................................................... 15 2.0 guidelines for getting started with 16-bit digital signal controlle rs....................................................... ................................... 21 3.0 cpu.............................................................................................. .............................................................................................. 27 4.0 memory organization .......................................... ................................................... ............ ........................................................ 37 5.0 flash program memory.................................................................. ...................................... .................................................... 103 6.0 resets ......................................................................................... ............................ ................................................................ 111 7.0 interrupt controller ................................................ ........................................................ ........................................................... 115 8.0 direct memory access (dma) ..................................... ............................................................. ................................................ 129 9.0 oscillator configuration ....................................... ....................................................................................................... .............. 143 10.0 power-saving features.......................................................... ............................................ ...................................................... 153 11.0 i/o ports ....................................................................................... ........................... ................................................................. 163 12.0 timer1 ......................................................................... ........................................................................................................... .. 211 13.0 timer2/3, timer4/5, timer6/7 and timer8/9 ......................... ................................................... ..... ........................................... 213 14.0 input capture............................................ ................................................... ............... .............................................................. 219 15.0 output compare.................................................... ......................................................... .......................................................... 223 16.0 high-speed pwm module........................................... ................................................... ........ .................................................. 229 17.0 quadrature encoder interface (qei) module .................................... .............................................. ......................................... 257 18.0 serial peripheral interface (spi)........................................ .................................................. ..................................................... 273 19.0 inter-integrated circuit? (i 2 c?).................................................................................... .......................................................... 281 20.0 universal asynchronous receiver transmitter (uart) ............................... .......................................... .................................. 289 21.0 controller area network (can) module (dspic33epxxxgm6xx/7xx devices only) .................... .............................. ......... 295 22.0 charge time measurement unit (ctmu) ....................................... ................................................ ........................................ 321 23.0 10-bit/12-bit analog-to-digital converter (adc) ............ ................................................................ .......................................... 327 24.0 data converter interface (dci) module................................. ................................................... .. .............................................. 343 25.0 peripheral trigger generator (ptg) module.................................. ................................................ .......................................... 349 26.0 op amp/comparator module ....................................... ................................................... ......... ................................................ 365 27.0 real-time clock and calendar (rtcc) ..................................... .................................................. ........................................... 383 28.0 parallel master port (pmp)................................................. ................................................ ...................................................... 395 29.0 programmable cyclic redundancy check (crc) generator ................................ ....................................... ........................... 405 30.0 special features ................................................... ........................................................ ........................................................... 411 31.0 instruction set summary ........................................................ ............................................ ...................................................... 419 32.0 development support............................................ ................................................... ......... ....................................................... 429 33.0 electrical characteristics ........................................................ ......................................... ......................................................... 433 34.0 high-temperature electrical characteristics.......................... ...................................................... ............................................ 499 35.0 packaging information..................................................... ................................................. ........................................................ 507 appendix a: revision history.......................................... ................................................... ...... .......................................................... 527 index ................................................. ................................................... ...................... ....................................................................... 529 the microchip web site ....................................................................... .................................. ............................................................ 537 customer change notification service ....................................... ................................................... . ................................................... 537 customer support............................................... ................................................... ............. ............................................................... 537 product identification system ................................................. ..................................................................................................... ...... 539 downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 12 ? 2013-2014 microchip technology inc. to our valued customers it is our intention to provide our valued customers with the be st documentation possible to ensure successful use of your micro chip products. to this end, we will continue to improve our publications to better suit your needs. our publications will be refined and enhanced as new volumes and updates are introduced. if you have any questions or comments regardi ng this publication, please contact the marketing communications department via e-mail at docerrors@microchip.com . we welcome your feedback. most current data sheet to obtain the most up-to-date version of this data s heet, please register at our worldwide web site at: http://www.microchip.com you can determine the version of a data sheet by examining its literature number found on the bottom outside corner of any page . the last character of the literature number is the versio n number, (e.g., ds30000000a is ve rsion a of document ds30000000). errata an errata sheet, describing minor operational differences fr om the data sheet and recommended workarounds, may exist for curren t devices. as device/documentation issues become known to us, we will publish an errata sheet. the errata will specify the revisi on of silicon and revision of document to which it applies. to determine if an errata sheet exists for a particular device, please check with one of the following: microchips worldwide web site; http://www.microchip.com your local microchip sales office (see last page) when contacting a sales office, please specify which device, re vision of silicon and data sheet (include literature number) you are using. customer notification system register on our web site at www.microchip.com to receive the most current information on all of our products. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 13 dspic33epxxxgm3xx/6xx/7xx referenced sources this device data sheet is based on the following individual chapters of the ?dspic33/pic24 family ref- erence manual? , which are available from the microchip web site ( www.microchip.com ). these documents should be considered as the general reference for the operation of a particular module or device feature. introduction (ds70573) cpu (ds70359) data memory (ds70595) program memory (ds70613) flash programming (ds70609) interrupts (ds70000600) oscillator (ds70580) reset (ds70602) watchdog timer and power-saving modes (ds70615) i/o ports (ds70000598) timers (ds70362) input capture (ds70000352) output compare (ds70005157) high-speed pwm (ds70645) quadrature encoder interface (qei) (ds70601) analog-to-digital converter (adc) (ds70621) universal asynchronous receiver transmitter (uart) (ds70000582) serial peripheral interface (spi) (ds70005185) inter-integrated circuit? (i 2 c?) (ds70000195) data converter interface (dci) module (ds70356) enhanced controller area network (ecan?) (ds70353) direct memory access (dma) (ds70348) programming and diagnostics (ds70608) op amp/comparator (ds70000357) 32-bit programmable cyclic redundancy check (crc) (ds70346) parallel master port (pmp) (ds70576) device configuration (ds70000618) peripheral trigger generator (ptg) (ds70669) charge time measurement unit (ctmu) (ds70661) downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 14 ? 2013-2014 microchip technology inc. notes: downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 15 dspic33epxxxgm3xx/6xx/7xx 1.0 device overview this document contains device-specific information for the dspic33epxxxgm3xx/6xx/7xx digital signal controller (dsc) devices. dspic33epxxxgm3xx/6xx/7xx devices contain extensive digital signal processor (dsp) functionality with a high-performance, 16-bit mcu architecture. figure 1-1 shows a general block diagram of the core and peripheral modules. table 1-1 lists the functions of the various pins shown in the pinout diagrams. figure 1-1: dspic33epxxxgm3xx/6xx/7xx block diagram note 1: this data sheet summarizes the features of the dspic33epxxxgm3xx/6xx/7xx family of devices. it is not intended to be a comprehensive resource. to comple- ment the information in this data sheet, refer to the related section of the ?dspic33/pic24 family reference manual? , which is available from the microchip web site ( www.microchip.com ) 2: some registers and associated bits described in this section may not be available on all devices. refer to section 4.0 memory organization in this data sheet for device-specific register and bit information. porta power-up timer oscillator start-up osc1/clki mclr v dd , v ss uart1/2/3/4 timing generation can1/2 (1) i2c1/2 adc timers input capture output compare av dd , av ss spi1/2/3 watchdog timer por/bor crc qei1/2 pwm remappable pins note 1: this feature or peripheral is only avai lable on dspic33epxxxgm6xx/7xx devices. op amp/ comparator ctmu ptg cpu refer to figure 3-1 for cpu diagram details. 16 16 portb portc portd porte portf portg ports peripheral modules timer downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 16 ? 2013-2014 microchip technology inc. table 1-1: pinout i/o descriptions pin name pin type buffer type pps description an0-an49 i analog no analog input channels 0-49. clki clko i o st/ cmos nono external clock source input. always associated with osc1 pin function. oscillator crystal output. connects to crystal or resonator in crystal oscillator mode. optionally functions as clko in rc and ec modes. always associated with osc2 pin function. osc1osc2 i i/o st/ cmos nono oscillator crystal input. st buffer when configured in rc mode; cmos otherwise. oscillator crystal output. connects to crystal or resonator in crystal oscillator mode. optionally functions as clko in rc and ec modes. soscisosco i o st/ cmos nono 32.768 khz low-power oscillator crystal input; cmos otherwise. 32.768 khz low-power oscillator crystal output. ic1-ic8 i st yes input capture inputs 1 through 8. ocfa ocfb oc1-oc8 ii o stst yes no yes output compare fault a input (for compare channels). output compare fault b input (for compare channels). output compare 1 through 8. int0 int1 int2 int3 int4 ii i i i stst st st st no yes yes nono external interrupt 0. external interrupt 1. external interrupt 2. external interrupt 3. external interrupt 4. ra0-ra4, ra7-ra12, ra14-ra15 i/o st yes porta is a bidirectional i/o port. rb0-rb15 i/o st yes portb is a bidirectional i/o port. rc0-rc13, rc15 i/o st yes portc is a bidirectional i/o port. rd1-rd6, rd8, rd12-rd15 i/o st yes portd is a bidirectional i/o port. re0-re1, re8-re9, re12-re15 i/o st yes porte is a bidirectional i/o port. rf0-rf1, rf4-rf7, rf9-rf10, rf12-rf13 i/o st no portf is a bidirectional i/o port. rg0-rg3, rg6-rg15 i/o st yes portg is a bidirectional i/o port. t1ck t2ck t3ck t4ck t5ck t6ck t7ck t8ck t9ck ii i i i i i i i stst st st st st st st st no yes nono no no no no no timer1 external clock input. timer2 external clock input. timer3 external clock input. timer4 external clock input. timer5 external clock input. timer6 external clock input. timer7 external clock input. timer8 external clock input. timer9 external clock input. legend: cmos = cmos compatible input or output analog = analog input p = power st = schmitt trigger input with cmos levels o = output i = input pps = peripheral pin select ttl = ttl input buffer note 1: this pin is not available on all devices. for more information, see the pin diagrams section for pin availability. 2: av dd must be connected at all times. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 17 dspic33epxxxgm3xx/6xx/7xx u1cts u1rts u1rx u1tx i o i o st st yes yes yes yes uart1 clear-to-send. uart1 ready-to-send. uart1 receive. uart1 transmit. u2cts u2rts u2rx u2tx i o i o st st yes yes yes yes uart2 clear-to-send. uart2 ready-to-send. uart2 receive. uart2 transmit. u3cts u3rts u3rx u3tx i o i o st st yes yes yes yes uart3 clear-to-send. uart3 ready-to-send. uart3 receive. uart3 transmit. u4cts u4rts u4rx u4tx i o i o st st yes yes yes yes uart4 clear-to-send. uart4 ready-to-send. uart4 receive. uart4 transmit. sck1 sdi1 sdo1 ss1 i/o i o i/o stst st nono no no synchronous serial clock input/output for spi1. spi1 data in. spi1 data out. spi1 slave synchronization or frame pulse i/o. sck2 sdi2 sdo2 ss2 i/o i o i/o stst st yes yes yes yes synchronous serial clock input/output for spi2. spi2 data in. spi2 data out. spi2 slave synchronization or frame pulse i/o. sck3 sdi3 sdo3 ss3 i/o i o i/o stst st yes yes yes yes synchronous serial clock input/output for spi3. spi3 data in. spi3 data out. spi3 slave synchronization or frame pulse i/o. scl1 sda1 ascl1 asda1 i/o i/o i/o i/o stst st st nono no no synchronous serial clock input/output for i2c1. synchronous serial data input/output for i2c1. alternate synchronous serial clock input/output for i2c1. alternate synchronous serial data input/output for i2c1. scl2 sda2 ascl2 asda2 i/o i/o i/o i/o stst st st nono no no synchronous serial clock input/output for i2c2. synchronous serial data input/output for i2c2. alternate synchronous serial clock input/output for i2c2. alternate synchronous serial data input/output for i2c2. tms tck tdi tdo ii i o stst st nono no no jtag test mode select pin. jtag test clock input pin. jtag test data input pin. jtag test data output pin. table 1-1: pinout i/o descriptions (continued) pin name pin type buffer type pps description legend: cmos = cmos compatible input or output analog = analog input p = power st = schmitt trigger input with cmos levels o = output i = input pps = peripheral pin select ttl = ttl input buffer note 1: this pin is not available on all devices. for more information, see the pin diagrams section for pin availability. 2: av dd must be connected at all times. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 18 ? 2013-2014 microchip technology inc. indx1 ( 1 ) home1 ( 1 ) qea1 ( 1 ) qeb1 ( 1 ) cntcmp1 ( 1 ) ii i i o stst st st yes yes yes yes yes quadrature encoder index1 pulse input. quadrature encoder home1 pulse input. quadrature encoder phase a input in qei1 mode. auxiliary timer external clock input in timer mode. quadrature encoder phase a input in qei1 mode. auxiliary timer external gate input in timer mode. quadrature encoder compare output 1. indx2 ( 1 ) home2 ( 1 ) qea2 ( 1 ) qeb2 ( 1 ) cntcmp2 ( 1 ) ii i i o stst st st yes yes yes yes yes quadrature encoder index2 pulse input. quadrature encoder home2 pulse input. quadrature encoder phase a input in qei2 mode. auxiliary timer external clock input in timer mode. quadrature encoder phase b input in qei2 mode. auxiliary timer external gate input in timer mode. quadrature encoder compare output 2. cofscsck csdi csdo i/o i/o i o stst st yes yes yes yes data converter interface frame synchronization pin. data converter interface serial clock input/output pin. data converter interface serial data input pin. data converter interface serial data output pin. c1rx c1tx i o st yes yes can1 bus receive pin. can1 bus transmit pin c2rx c2tx i o st yes yes can2 bus receive pin. can2 bus transmit pin rtcc o no real-time clock and calendar alarm output. cv ref o analog no comparator voltage reference output. c1in1+, c1in2-, c1in1-, c1in3- c1out i o analog no yes comparator 1 inputs. comparator 1 output. c2in1+, c2in2-, c2in1-, c2in3- c2out i o analog no yes comparator 2 inputs. comparator 2 output. c3in1+, c3in2-, c2in1-, c3in3- c3out i o analog no yes comparator 3 inputs. comparator 3 output. c4in1+, c4in2-, c4in1-, c4in3- c4out i o analog no yes comparator 4 inputs. comparator 4 output. c5in1-, c5in2-, c5in3-, c5in4-, c5in1+ c5out i o analog no yes comparator 5 inputs. comparator 5 output. table 1-1: pinout i/o descriptions (continued) pin name pin type buffer type pps description legend: cmos = cmos compatible input or output analog = analog input p = power st = schmitt trigger input with cmos levels o = output i = input pps = peripheral pin select ttl = ttl input buffer note 1: this pin is not available on all devices. for more information, see the pin diagrams section for pin availability. 2: av dd must be connected at all times. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 19 dspic33epxxxgm3xx/6xx/7xx pma0 pma1 pma2-pma13 pmbe pmcs1, pmcs2 pmd0-pmd7 pmrd pmwr i/o i/o oo o i/o oo ttl/st ttl/st ttl/st nono no no no no no no parallel master port address bit 0 input (buffered slave modes) and output (master modes). parallel master port address bit 1 input (buffered slave modes) and output (master modes). parallel master port address bits 2-13 (demultiplexed master modes). parallel master port byte enable strobe. parallel master port chip select 1 and 2 strobe. parallel master port data (demultiplexed master mode) or address/data (multiplexed master modes). parallel master port read strobe. parallel master port write strobe. flt1-flt2 ( 1 ) flt3-flt8 ( 1 ) flt32 dtcmp1-dtcmp6 ( 1 ) pwm1l-pwm6l ( 1 ) pwm1h-pwm6h ( 1 ) synci1 ( 1 ) , synci2 ( 1 ) synco1, synco2 ( 1 ) ii i i oo i o stst st st st yes nono yes nono yes yes pwmx fault inputs 1 through 2. pwmx fault inputs 3 through 8 pwmx fault input 32 pwmx dead-time compensation inputs 1 through 6. pwmx low outputs 1 through 7. pwmx high outputs 1 through 7. pwmx synchronization input 1. pwmx synchronization outputs 1 and 2. pged1pgec1 pged2 pgec2 pged3 pgec3 i/o i i/o i i/o i stst st st st st nono no no no no data i/o pin for programming/debugging communication channel 1. clock input pin for programming/debugging communication channel 1. data i/o pin for programming/debugging communication channel 2. clock input pin for programming/debugging communication channel 2. data i/o pin for programming/debugging communication channel 3. clock input pin for programming/debugging communication channel 3. mclr i/p st no master clear (reset) input. this pin is an active-low reset to the device. av dd ( 2 ) p p no positive supply for analog modules. this pin must be connected at al l times. av ss p p no ground reference for analog modules. v dd p no positive supply for peripheral logic and i/o pins. v cap p no cpu logic filter capacitor connection. v ss p no ground reference for logic and i/o pins. v ref + i analog no analog voltage reference (high) input. v ref - i analog no analog voltage reference (low) input. table 1-1: pinout i/o descriptions (continued) pin name pin type buffer type pps description legend: cmos = cmos compatible input or output analog = analog input p = power st = schmitt trigger input with cmos levels o = output i = input pps = peripheral pin select ttl = ttl input buffer note 1: this pin is not available on all devices. for more information, see the pin diagrams section for pin availability. 2: av dd must be connected at all times. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 20 ? 2013-2014 microchip technology inc. notes: downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 21 dspic33epxxxgm3xx/6xx/7xx 2.0 guidelines for getting started with 16-bit digital signal controllers 2.1 basic connection requirements getting started with the dspic33epxxxgm3xx/6xx/7xx family requires attention to a minimal set of device pin connections before proceeding with development. the following is a list of pin names, which must always be connected: all v dd and v ss pins (see section 2.2 decoupling capacitors ) all av dd and av ss pins (regardless if adc module is not used) (see section 2.2 decoupling capacitors ) v cap (see section 2.3 cpu logic filter capacitor connection (v cap ) ) mclr pin (see section 2.4 master clear (mclr) pin ) pgecx/pgedx pins used for in-circuit serial programming? (icsp?) and debugging purposes (see section 2.5 icsp pins ) osc1 and osc2 pins when external oscillator source is used (see section 2.6 external oscillator pins ) additionally, the following pins may be required: v ref +/v ref - pins are used when external voltage reference for adc module is implemented 2.2 decoupling capacitors the use of decoupling capacitors on every pair of power supply pins, such as v dd , v ss , av dd and av ss is required. consider the following criteria when using decoupling capacitors: value and type of capacitor: recommendation of 0.1 f (100 nf), 10-20v. this capacitor should be a low-esr and have resonance frequency in the range of 20 mhz and higher. it is recommended to use ceramic capacitors. placement on the printed circuit board: the decoupling capacitors should be placed as close to the pins as possible. it is recommended to place the capacitors on the same side of the board as the device. if space is constricted, the capacitor can be placed on another layer on the pcb using a via; however, ensure that the trace length from the pin to the capacitor is within one-quarter inch (6 mm) in length. handling high-frequency noise: if the board is experiencing high-frequency noise, above tens of mhz, add a second ceramic-type capacitor in parallel to the above described decoupling capacitor. the value of the second capacitor can be in the range of 0.01 f to 0.001 f. place this second capacitor next to the primary decoupling capacitor. in high-speed circuit designs, consider implementing a decade pair of capacitances as close to the power and ground pins as possible. for example, 0.1 f in parallel with 0.001 f. maximizing performance: on the board layout from the power supply circuit, run the power and return traces to the decoupling capacitors first, and then to the device pins. this ensures that the decoupling capacitors are first in the power chain. equally important is to keep the trace length between the capacitor and the power pins to a minimum, thereby reducing pcb track inductance. note 1: this data sheet summarizes the features of the dspic33epxxxgm3xx/6xx/7xx family of devices. it is not intended to be a comprehensive reference source. to complement the information in this data sheet, refer to the related section of the ?dspic33/pic24 family reference manual? , which is available from the microchip web site ( www.microchip.com ) 2: some registers and associated bits described in this section may not be available on all devices. refer to section 4.0 memory organization in this data sheet for device-specific register and bit information. note: the av dd and av ss pins must be connected independent of the adc voltage reference source. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 22 ? 2013-2014 microchip technology inc. figure 2-1: recommended minimum connection 2.2.1 tank capacitors on boards with power traces running longer than six inches in length, it is suggested to use a tank capacitor for integrated circuits including dscs to supply a local power source. the value of the tank capacitor should be determined based on the trace resistance that con- nects the power supply source to the device, and the maximum current drawn by the device in the applica- tion. in other words, select the tank capacitor so that it meets the acceptable voltage sag at the device. typical values range from 4.7 f to 47 f. 2.3 cpu logic filter capacitor connection (v cap ) a low-esr (< 1 ohms) capacitor is required on the v cap pin, which is used to stabilize the voltage regulator output voltage. the v cap pin must not be connected to v dd , and must have a capacitor greater than 4.7 f (10 f is recommended), 16v connected to ground. the type can be ceramic or tantalum. see section 33.0 electrical characteristics for additional information. the placement of this capacitor should be close to the v cap pin. it is recommended that the trace length not exceeds one-quarter inch (6 mm). see section 30.3 on-chip voltage regulator for details. 2.4 master clear (mclr ) pin the mclr pin provides two specific device functions: device reset device programming and debugging. during device programming and debugging, the resistance and capacitance that can be added to the pin must be considered. device programmers and debuggers drive the mclr pin. consequently, specific voltage levels (v ih and v il ) and fast signal transitions must not be adversely affected. therefore, specific values of r and c will need to be adjusted based on the application and pcb requirements. for example, as shown in figure 2-2 , it is recommended that the capacitor, c, be isolated from the mclr pin during programming and debugging operations. place the components as shown in figure 2-2 within one-quarter inch (6 mm) from the mclr pin. figure 2-2: example of mclr pin connections dspic33ep v dd v ss v dd v ss v ss v dd av dd av ss v dd v ss 0.1 f ceramic 0.1 f ceramic 0.1 f ceramic 0.1 f ceramic c r v dd mclr 0.1 f ceramic v cap l1 (1) r1 10 f tantalum note 1: as an option, instead of a hard-wired connection, an inductor (l1) can be substituted between v dd and av dd to improve adc noise rejection. the inductor impedance should be less than 1 ? and the inductor capacity greater than 10 ma. where: f f cnv 2 ------------- - = f 1 2 ? lc ?? ----------------------- = l 1 2 ? fc ?? --------------------- - ?? ?? 2 = (i.e., adc conversion rate/2) note 1: r ? 10 k ? is recommended. a suggested starting value is 10 k ? . ensure that the mclr pin v ih and v il specifications are met. 2: r1 ? 470 ? will limit any current flowing into mclr from the external capacitor, c, in the event of mclr pin breakdown due to electrostatic discharge (esd) or electrical overstress (eos). ensure that the mclr pin v ih and v il specifications are met. c r1 (2) r (1) v dd mclr dspic33ep jp downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 23 dspic33epxxxgm3xx/6xx/7xx 2.5 icsp pins the pgecx and pgedx pins are used for icsp and debugging purposes. it is recommended to keep the trace length between the icsp connector and the icsp pins on the device as short as possible. if the icsp con- nector is expected to experience an esd event, a series resistor is recommended, with the value in the range of a few tens of ohms, not to exceed 100 ohms. pull-up resistors, series diodes and capacitors on the pgecx and pgedx pins are not recommended as they will interfere with the programmer/debugger communi- cations to the device. if such discrete components are an application requirement, they should be removed from the circuit during programming and debugging. alternatively, refer to the ac/dc characteristics and timing requirements information in the respective device flash programming specification for information on capacitive loading limits and pin voltage input high (v ih ) and voltage input low (v il ) requirements. ensure that the communication channel select (i.e., pgecx/pgedx pins) programmed into the device matches the physical connections for the icsp to mplab ? pickit? 3, mplab icd 3, or mplab real ice?. for more information on mplab icd 2, icd 3 and real ice connection requirements, refer to the following documents that are available on the microchip web site: ?using mplab ? icd 3? (poster) ds51765 ?mplab ? icd 3 design advisory? ds51764 ?mplab ? real ice? in-circuit emulator user?s guide? ds51616 ?using mplab ? real ice? in-circuit emulator? (poster) ds51749 2.6 external oscillator pins many dscs have options for at least two oscillators: a high-frequency primary oscillator and a low-frequency secondary oscillator. for details, see section 9.0 oscillator configuration for details. the oscillator circuit should be placed on the same side of the board as the device. also, place the oscillator circuit close to the respective oscillator pins, not exceeding one-half inch (12 mm) distance between them. the load capacitors should be placed next to the oscillator itself, on the same side of the board. use a grounded copper pour around the oscillator circuit to isolate them from surrounding circuits. the grounded copper pour should be routed directly to the mcu ground. do not run any signal traces or power traces inside the ground pour. also, if using a two-sided board, avoid any traces on the other side of the board where the crystal is placed. a suggested layout is shown in figure 2-3 . figure 2-3: suggested placement of the oscillator circuit main oscillator guard ring guard trace oscillator pins downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 24 ? 2013-2014 microchip technology inc. 2.7 oscillator value conditions on device start-up if the pll of the target device is enabled and configured for the device start-up oscillator, the maximum oscillator source frequency must be limited to 5 mhz < f in < 13.6 mhz to comply with device pll start-up conditions. this means that if the external oscillator frequency is outside this range, the application must start up in the frc mode first. the default pll settings after a por with an oscillator frequency outside this range will violate the device operating speed. once the device powers up, the application firmware can initialize the pll sfrs, clkdiv and plldbf to a suitable value, and then perform a clock switch to the oscillator + pll clock source. note that clock switching must be enabled in the device configuration word. 2.8 unused i/os unused i/o pins should be configured as outputs and driven to a logic low state. alternatively, connect a 1k to 10k resistor between v ss and unused pins, and drive the output to logic low. 2.9 application examples induction heating uninterruptable power supplies (ups) dc/ac inverters compressor motor control washing machine 3-phase motor control bldc motor control automotive hvac, cooling fans, fuel pumps stepper motor control audio and fluid sensor monitoring camera lens focus and stability control speech (playback, hands-free kits, answering machines, voip) consumer audio industrial and building control (security systems and access control) barcode reading networking: lan switches, gateways data storage device management smart cards and smart card readers dual motor control examples of typical application connections are shown in figure 2-4 through figure 2-8 . figure 2-4: boost converter implementation i pfc v output adc channel adc channel pwm k 1 k 2 k 3 fet dspic33ep v input op amp/ output driver comparator downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 25 dspic33epxxxgm3xx/6xx/7xx figure 2-5: single-phase synchronous buck converter figure 2-6: multiphase sy nchronous buck converter k 1 op amp/ k 2 k 7 pwm pwm adc channel adc channel 5v output i 5v 12v input fet driver dspic33ep comparator k 5 k 4 k 3 k 7 op amp/comparator op amp/comparator adc channel op amp/comparator adc channel pwmpwm pwm pwm pwm pwm 3.3v output 12v input fet driver fet driver fet driver dspic33ep k 6 downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 26 ? 2013-2014 microchip technology inc. figure 2-7: interleaved pfc figure 2-8: bemf voltage measured using the adc module v ac v out + op amp/comparator pwm adc pwm |v ac | k 4 k 3 fet dspic33ep driver v out - adc channel fet driver k 1 k 2 op amp/ channel op amp/ comparator comparator 3-phase inverter pwm3h pwm3l pwm2h pwm2l pwm1h pwm1l fltx fault bldc dspic33ep an3 an4 an5 an2 demand phase terminal voltage feedback r49 r41 r34 r36 r44 r52 downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 27 dspic33epxxxgm3xx/6xx/7xx 3.0 cpu the cpu has a 16-bit (data) modified harvard archi- tecture with an enhanced instruction set, including significant support for digital signal processing. the cpu has a 24-bit instruction word, with a variable length opcode field. the program counter (pc) is 23 bits wide and addresses up to 4m x 24 bits of user program memory space. an instruction prefetch mechanism helps maintain throughput and provides predictable execution. most instructions execute in a single-cycle, effective execu- tion rate, with the exception of instructions that change the program flow, the double-word move ( mov.d ) instruction, psv accesses and the table instructions. overhead-free program loop constructs are supported using the do and repeat instructions, both of which are interruptible at any point. 3.1 registers the dspic33epxxxgm3xx/6xx/7xx devices have sixteen 16-bit working registers in the programmers model. each of the working registers can act as a data, address or address offset register. the 16th working register (w15) operates as a software stack pointer for interrupts and calls. 3.2 instruction set the device instruction set has two classes of instruc- tions: the mcu class of instructions and the dsp class of instructions. these two instruction classes are seamlessly integrated into the architecture and exe- cute from a single execution unit. the instruction set includes many addressing modes and was designed for optimum c compiler efficiency. 3.3 data space addressing the base data space can be addressed as 4k words or 8 kbytes and is split into two blocks, referred to as x and y data memory. each memory block has its own independent address generation unit (agu). the mcu class of instructions operate solely through the x memory agu, which accesses the entire memory map as one linear data space. on dspic33ep devices, certain dsp instructions operate through the x and y agus to support dual operand reads, which splits the data address space into two parts. the x and y data space boundary is device-specific. the upper 32 kbytes of the data space memory map can optionally be mapped into program space at any 16k program word boundary. the program-to-data space mapping feature, known as program space visibility (psv), lets any instruction access program space as if it were data space. moreover, the base data space address is used in conjunction with a data space read or write page register (dsrpag or dswpag) to form an extended data space (eds) address. the eds can be addressed as 8m words or 16 mbytes. refer to data memory (ds70595) and program memory (ds70613) in the ?dspic33/ pic24 family reference manual? for more details on eds, psv and table accesses. on dspic33ep devices, overhead-free circular buffers (modulo addressing) are supported in both x and y address spaces. the modulo addressing removes the software boundary checking overhead for dsp algorithms. the x agu circular addressing can be used with any of the mcu class of instructions. the x agu also supports bit-reversed addressing to greatly simplify input or output data reordering for radix-2 fft algorithms. 3.4 addressing modes the cpu supports these addressing modes: inherent (no operand) relative literal memory direct register direct register indirect each instruction is associated with a predefined addressing mode group, depending upon its functional requirements. as many as six addressing modes are supported for each instruction. note 1: this data sheet summarizes the features of the dspic33epxxxgm3xx/6xx/7xx family of devices. it is not intended to be a comprehensive reference source. to com- plement the information in this data sheet, refer to the dspic33/pic24 family refer- ence manual , cpu (ds70359), which is available from the microchip web site ( www.microchip.com ). 2: some registers and associated bits described in this section may not be available on all devices. refer to section 4.0 memory organization in this data sheet for device-specific register and bit information. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 28 ? 2013-2014 microchip technology inc. figure 3-1: dspic33epxxxgm3x x/6xx/7xx cpu block diagram instruction decode and control 16 pch 16 program counter 16-bit alu 24 24 24 24 x data bus pcu 16 16 16 divide support engine dsp rom latch 16 y data bus ea mux x ragu x wagu y agu 16 24 16 16 16 16 16 16 16 8 interrupt controller psv and table data access control block stack control logic loop control logic data latch data latch y data ram x data ram address latch address latch 16 data latch 16 16 16 x address bus y address bus 24 literal data program memory address latch power, reset and oscillator control signals to various blocks ports peripheral modules modules pcl 16 x 16 w register array ir downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 29 dspic33epxxxgm3xx/6xx/7xx 3.5 programmers model the programmers model for the dspic33epxxxgm3xx/ 6xx/7xx devices is shown in figure 3-2 . all registers in the programmers model are memory-mapped and can be manipulated directly by instructions. table 3-1 lists a description of each register. in addition to the registers contained in the programmers model, the dspic33epxxxgm3xx/ 6xx/7xx devices contain control registers for modulo addressing and bit-reversed addressing, and interrupts. these registers are described in subsequent sections of this document. all registers associated with the programmers model are memory-mapped, as shown in table 4-1 . table 3-1: programmers model register descriptions register(s) name description w0 through w15 working register array acca, accb 40-bit dsp accumulators pc 23-bit program counter sr alu and dsp engine status register splim stack pointer limit value register tblpag table memory page address register dsrpag extended data space (eds) read page register dswpag extended data space (eds) write page register rcount repeat loop count register dcount do loop count register dostarth ( 1 ) , dostartl ( 1 ) do loop start address register (high and low) doendh, doendl do loop end address register (high and low) corcon contains dsp engine, do loop control and trap status bits note 1: the dostarth and dostartl registers are read-only. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 30 ? 2013-2014 microchip technology inc. figure 3-2: programmers model novz c tblpag pc23 pc0 7 0 d0 d15 program counter data table page address status register working/address registers dsp operand registers w0 (wreg) w1w2 w3 w4 w5 w6 w7 w8 w9 w10 w11 w12 w13 frame pointer/w14 stack pointer/w15 dsp address registers ad39 ad0 ad31 dsp accumulators (1) acca accb dsrpag 9 0 ra 0 oa (1) ob (1) sa (1) sb (1) rcount 15 0 repeat loop counter 15 0 do loop counter and stack dostart 23 0 do loop start address and stack 0 doend do loop end address and stack ipl2 ipl1 splim stack pointer limit ad15 23 0 srl ipl0 push.s and pop.s shadows nested do stack 0 0 oab (1) sab (1) x data space read page address da (1) dc 0 0 0 0 dswpag x data space write page address 8 0 corcon 15 0 cpu core control register dcount downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 31 dspic33epxxxgm3xx/6xx/7xx 3.6 cpu control registers register 3-1: sr: cpu status register r/w-0 r/w-0 r/w-0 r/w-0 r/c-0 r/c-0 r-0 r/w-0 oa ob sa ( 3 ) sb ( 3 ) oab sab da dc bit 15 bit 8 r/w-0 ( 2 ) r/w-0 ( 2 ) r/w-0 ( 2 ) r-0 r/w-0 r/w-0 r/w-0 r/w-0 ipl2 ( 1 ) ipl1 ( 1 ) ipl0 ( 1 ) ra n ov z c bit 7 bit 0 legend: c = clearable bit r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 oa: accumulator a overflow status bit 1 = accumulator a has overflowed 0 = accumulator a has not overflowed bit 14 ob: accumulator b overflow status bit 1 = accumulator b has overflowed 0 = accumulator b has not overflowed bit 13 sa: accumulator a saturation sticky status bit ( 3 ) 1 = accumulator a is saturated or has been saturated at some time 0 = accumulator a is not saturated bit 12 sb: accumulator b saturation sticky status bit ( 3 ) 1 = accumulator b is saturated or has been saturated at some time 0 = accumulator b is not saturated bit 11 oab: oa || ob combined accumulator overflow status bit 1 = accumulator a or b has overflowed 0 = neither accumulator a or b has overflowed bit 10 sab: sa || sb combined accumulator sticky status bit 1 = accumulator a or b is saturated or has been saturated at some time 0 = neither accumulator a or b is saturated bit 9 da: do loop active bit 1 = do loop in progress 0 = do loop not in progress bit 8 dc: mcu alu half carry/borrow bit 1 = a carry-out from the 4th low-order bit (for byte-sized data) or 8th low-order bit (for word-sized data) of the result occurred 0 = no carry-out from the 4th low-order bit (for byte-sized data) or 8th low-order bit (for word-sized data) of the result occurred note 1: the ipl<2:0> bits are concatenated with the ipl<3> bit (corcon<3>) to form the cpu interrupt priority level. the value in parentheses indicates the ipl, if ipl<3> = 1 . user interrupts are disabled when ipl<3> = 1 . 2: the ipl<2:0> status bits are read-only when the nstdis bit (intcon1<15>) = 1 . 3: a data write to the sr register can modify the sa and sb bits by either a data write to sa and sb or by clearing the sab bit. to avoid a possible sa or sb bit write race condition, the sa and sb bits should not be modified using bit operations. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 32 ? 2013-2014 microchip technology inc. bit 7-5 ipl<2:0>: cpu interrupt priority level status bits ( 1 , 2 ) 111 = cpu interrupt priority level is 7 (15); user interrupts are disabled 110 = cpu interrupt priority level is 6 (14) 101 = cpu interrupt priority level is 5 (13) 100 = cpu interrupt priority level is 4 (12) 011 = cpu interrupt priority level is 3 (11) 010 = cpu interrupt priority level is 2 (10) 001 = cpu interrupt priority level is 1 (9) 000 = cpu interrupt priority level is 0 (8) bit 4 ra: repeat loop active bit 1 = repeat loop is in progress 0 = repeat loop is not in progress bit 3 n: mcu alu negative bit 1 = result was negative 0 = result was non-negative (zero or positive) bit 2 ov: mcu alu overflow bit this bit is used for signed arithmetic (2s complement). it indicates an overflow of the magnitude that causes the sign bit to change state. 1 = overflow occurred for signed arithmetic (in this arithmetic opera tion) 0 = no overflow occurred bit 1 z: mcu alu zero bit 1 = an operation that affects the z bit has set it at some time in the past 0 = the most recent operation that affects the z bit has cleared it (i.e., a non-zero result) bit 0 c: mcu alu carry/borrow bit 1 = a carry-out from the most significant bit (msb) of the result occurred 0 = no carry-out from the most significant bit of the result occurred register 3-1: sr: cpu status register (continued) note 1: the ipl<2:0> bits are concatenated with the ipl<3> bit (corcon<3>) to form the cpu interrupt priority level. the value in parentheses indicates the ipl, if ipl<3> = 1 . user interrupts are disabled when ipl<3> = 1 . 2: the ipl<2:0> status bits are read-only when the nstdis bit (intcon1<15>) = 1 . 3: a data write to the sr register can modify the sa and sb bits by either a data write to sa and sb or by clearing the sab bit. to avoid a possible sa or sb bit write race condition, the sa and sb bits should not be modified using bit operations. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 33 dspic33epxxxgm3xx/6xx/7xx register 3-2: corcon: core control register ( 3 ) r/w-0 u-0 r/w-0 r/w-0 r/w-0 r-0 r-0 r-0 var us1 us0 edt ( 1 ) dl2 dl1 dl0 bit 15 bit 8 r/w-0 r/w-0 r/w-1 r/w-0 r/c-0 r-0 r/w-0 r/w-0 sata satb satdw accsat ipl3 ( 2 ) sfa rnd if bit 7 bit 0 legend: c = clearable bit r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 var: variable exception processing latency control bit 1 = variable exception processing latency is enabled 0 = fixed exception processing latency is enabled bit 14 unimplemented: read as 0 bit 13-12 us<1:0>: dsp multiply unsigned/signed control bits 11 = reserved 10 = dsp engine multiplies are mixed-sign 01 = dsp engine multiplies are unsigned 00 = dsp engine multiplies are signed bit 11 edt: early do loop termination control bit ( 1 ) 1 = terminates executing do loop at end of current loop iteration 0 = no effect bit 10-8 dl<2:0>: do loop nesting level status bits 111 = 7 do loops are active 001 = 1 do loop is active 000 = 0 do loops are active bit 7 sata: acca saturation enable bit 1 = accumulator a saturation is enabled 0 = accumulator a saturation is disabled bit 6 satb: accb saturation enable bit 1 = accumulator b saturation is enabled 0 = accumulator b saturation is disabled bit 5 satdw: data space write from dsp engine saturation enable bit 1 = data space write saturation is enabled 0 = data space write saturation is disabled bit 4 accsat: accumulator saturation mode select bit 1 = 9.31 saturation (super saturation) 0 = 1.31 saturation (normal saturation) note 1: this bit is always read as 0 . 2: the ipl3 bit is concatenated with the ipl<2:0> bits (sr<7:5>) to form the cpu interrupt priority level. 3: refer to the ?dspic33/pic24 family reference manual , cpu (ds70359) for more detailed information. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 34 ? 2013-2014 microchip technology inc. bit 3 ipl3: cpu interrupt priority level status bit 3 ( 2 ) 1 = cpu interrupt priority level is greater than 7 0 = cpu interrupt priority level is 7 or less bit 2 sfa: stack frame active status bit 1 = stack frame is active; w14 and w15 address 0x0000 to 0xffff, regardless of dsrpag and dswpag values 0 = stack frame is not active; w14 and w15 address of eds or base data space bit 1 rnd: rounding mode select bit 1 = biased (conventional) rounding is enabled 0 = unbiased (convergent) rounding is enabled bit 0 if: integer or fractional multiplier mode select bit 1 = integer mode is enabled for dsp multiply 0 = fractional mode is enabled for dsp multiply register 3-2: corcon: core control register ( 3 ) (continued) note 1: this bit is always read as 0 . 2: the ipl3 bit is concatenated with the ipl<2:0> bits (sr<7:5>) to form the cpu interrupt priority level. 3: refer to the ?dspic33/pic24 family reference manual , cpu (ds70359) for more detailed information. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 35 dspic33epxxxgm3xx/6xx/7xx 3.7 arithmetic logic unit (alu) the dspic33epxxxgm3xx/6xx/7xx family alu is 16 bits wide and is capable of addition, subtraction, bit shifts and logic operations. unless otherwise men- tioned, arithmetic operations are twos complement in nature. depending on the operation, the alu can affect the values of the carry (c), zero (z), negative (n), overflow (ov) and digit carry (dc) status bits in the sr register. the c and dc status bits operate as borrow and digit borrow bits, respectively, for subtraction operations. the alu can perform 8-bit or 16-bit operations, depending on the mode of the instruction that is used. data for the alu operation can come from the w register array or data memory, depending on the addressing mode of the instruction. likewise, output data from the alu can be written to the w register array or a data memory location. refer to the ?16-bit mcu and dsc programmer?s reference manual? (ds70157) for information on the sr bits affected by each instruction. the core cpu incorporates hardware support for both multiplication and division. this includes a dedicated hardware multiplier and support hardware for 16-bit divisor division. 3.7.1 multiplier using the high-speed, 17-bit x 17-bit multiplier, the alu supports unsigned, signed, or mixed-sign operation in several mcu multiplication modes: 16-bit x 16-bit signed 16-bit x 16-bit unsigned 16-bit signed x 5-bit (literal) unsigned 16-bit signed x 16-bit unsigned 16-bit unsigned x 5-bit (literal) unsigned 16-bit unsigned x 16-bit signed 8-bit unsigned x 8-bit unsigned 3.7.2 divider the divide block supports 32-bit/16-bit and 16-bit/16-bit signed and unsigned integer divide operations with the following data sizes: 32-bit signed/16-bit signed divide 32-bit unsigned/16-bit unsigned divide 16-bit signed/16-bit signed divide 16-bit unsigned/16-bit unsigned divide the quotient for all divide instructions ends up in w0 and the remainder in w1. 16-bit signed and unsigned div instructions can specify any w register for both the 16-bit divisor (wn) and any w register (aligned) pair (w(m + 1):wm) for the 32-bit dividend. the divide algorithm takes one cycle per bit of divisor, so both 32-bit/16-bit and 16-bit/16-bit instructions take the same number of cycles to execute. 3.8 dsp engine the dsp engine consists of a high-speed, 17-bit x 17-bit multiplier, a 40-bit barrel shifter and a 40-bit adder/ subtracter (with two target accumulators, round and saturation logic). the dsp engine can also perform inherent accumulator- to-accumulator operations that require no additional data. these instructions are add , sub and neg . the dsp engine has options selected through bits in the cpu core control register (corcon), as listed below: fractional or integer dsp multiply (if) signed, unsigned or mixed-sign dsp multiply (us) conventional or convergent rounding (rnd) automatic saturation on/off for acca (sata) automatic saturation on/off for accb (satb) automatic saturation on/off for writes to data memory (satdw) accumulator saturation mode selection (accsat) table 3-2: dsp instructions summary instruction algebraic operation acc write back clr a = 0 yes ed a = (x C y) 2 no edac a = a + (x C y) 2 no mac a = a + (x y) yes mac a = a + x 2 no movsac no change in a yes mpy a = x y no mpy a = x 2 no mpy.n a = C x y no msc a = a C x y yes downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 36 ? 2013-2014 microchip technology inc. notes: downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 37 dspic33epxxxgm3xx/6xx/7xx 4.0 memory organization the dspic33epxxxgm3xx/6xx/7xx family architec- ture features separate program and data memory spaces and buses. this architecture also allows the direct access of program memory from the data space (ds) during code execution. 4.1 program address space the program address memory space of the dspic33epxxxgm3xx/6xx/7xx devices is 4m instructions. the space is addressable by a 24-bit value derived either from the 23-bit pc during program execution, or from table operation or data space remapping, as described in section 4.7 interfacing program and data memory spaces . user application access to the program memory space is restricted to the lower half of the address range (0x000000 to 0x7fffff). the exception is the use of tblrd operations, which use tblpag<7> to read device id sections of the configuration memory space. the program memory maps, which are presented by device family and memory size, are shown in figure 4-1 through figure 4-3 . figure 4-1: program memory map for dspic33ep128gm3xx/6xx/7xx devices ( 1 ) note: this data sheet summarizes the fea- tures of the dspic33epxxxgm3xx/6xx/ 7xx family of devices. it is not intended to be a comprehensive reference source. to complement the information in this data sheet, refer to the dspic33/pic24 family reference manual , program memory (ds70613), which is available from the microchip web site ( www.microchip.com ). reset address 0x000000 0x000002 user program flash memory 0x0155ec 0x0155ea (44k instructions) 0x800000 devid 0xfefffe 0xff0000 0xfffffe unimplemented (read 0 s) goto instruction 0x000004 reserved 0x7ffffe 0x000200 0x0001fe interrupt vector table configuration memory space user memory space flash configuration bytes (2) 0x015600 0x0155fe reserved 0xff0002 note 1: memory areas are not shown to scale. 2: on reset, these bits are automatically copied into the device configuration shadow registers. 0xff0004 reserved 0x800ff8 0x800ff6 0x801000 0x800ffe userid 0xf9fffe 0xfa0000 0xfa0002 0xfa0004 write latches reserved downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 38 ? 2013-2014 microchip technology inc. figure 4-2: program memo ry map for dspic33ep256gm3xx/6xx/7xx devices ( 1 ) reset address 0x000000 0x000002 user program flash memory 0x02abec 0x02abea (88k instructions) 0x800000 devid 0xfefffe 0xff0000 0xfffffe unimplemented (read 0 s) goto instruction 0x000004 reserved 0x7ffffe 0x000200 0x0001fe interrupt vector table configuration memory space user memory space flash configuration bytes (2) 0x02ac00 0x02abfe reserved 0xff0002 note 1: memory areas are not shown to scale. 2: on reset, these bits are automatically copied into the device configuration shadow registers. 0xff0004 reserved 0x800ff8 0x800ff6 0x801000 0x800ffe userid 0xf9fffe 0xfa0000 0xfa0002 0xfa0004 write latches reserved downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 39 dspic33epxxxgm3xx/6xx/7xx figure 4-3: program memo ry map for dspic33ep512gm3xx/6xx/7xx devices ( 1 ) reset address 0x000000 0x000002 user program flash memory 0x0557ec 0x0557ea (175k instructions) 0x800000 0xfa0000 write latches 0xfa0002 0xfa0004 devid 0xfefffe 0xff0000 0xfffffe 0xf9fffe unimplemented (read 0 s) goto instruction 0x000004 reserved 0x7ffffe reserved 0x000200 0x0001fe interrupt vector table configuration memory space user memory space flash configuration bytes (2) 0x055800 0x0557fe reserved 0xff0002 note 1: memory areas are not shown to scale. 2: on reset, these bits are automatically copied into the device configuration shadow registers. 0xff0004 reserved 0x800ff8 0x800ff6 0x801000 0x800ffe userid downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 40 ? 2013-2014 microchip technology inc. 4.1.1 program memory organization the program memory space is organized in word- addressable blocks. although it is treated as 24 bits wide, it is more appropriate to think of each address of the program memory as a lower and upper word, with the upper byte of the upper word being unimplemented. the lower word always has an even address, while the upper word has an odd address ( figure 4-4 ). program memory addresses are always word-aligned on the lower word and addresses are incremented or decremented by two during code execution. this arrangement provides compatibility with data memory space addressing and makes data in the program memory space accessible. 4.1.2 interrupt and trap vectors all dspic33epxxxgm3xx/6xx/7xx devices reserve the addresses between 0x000000 and 0x000200 for hard-coded program execution vectors. a hardware reset vector is provided to redirect code execution from the default value of the pc on device reset to the actual start of code. a goto instruction is programmed by the user application at address, 0x000000 of flash memory, with the actual address for the start of code at address, 0x000002 of flash memory. a more detailed discussion of the interrupt vector tables is provided in section 7.1 interrupt vector table . figure 4-4: program memory organization 0 8 16 pc address 0x000000 0x000002 0x000004 0x000006 23 00000000 00000000 00000000 00000000 program memory phantom byte (read as 0 ) least significant word most significant word instruction width 0x000001 0x000003 0x000005 0x000007 msw address (lsw address) downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 41 dspic33epxxxgm3xx/6xx/7xx 4.2 data address space the dspic33epxxxgm3xx/6xx/7xx cpu has a separate 16-bit wide data memory space. the data space is accessed using separate address generation units (agus) for read and write operations. the data memory maps, which are presented by device family and memory size, are shown in figure 4-5 through figure 4-7 . all effective addresses (eas) in the data memory space are 16 bits wide and point to bytes within the data space. this arrangement gives a base data space address range of 64 kbytes or 32k words. the base data space address is used in conjunction with a data space read or write page register (dsrpag or dswpag) to form an extended data space, which has a total address range of 16 mbytes. dspic33epxxxgm3xx/6xx/7xx devices implement up to 52 kbytes of data memory (4 kbytes of data memory for special function registers and up to 48 kbytes of data memory for ram). if an ea points to a location outside of this area, an all zero word or byte is returned. 4.2.1 data space width the data memory space is organized in byte- addressable, 16-bit wide blocks. data is aligned in data memory and registers as 16-bit words, but all data space eas resolve to bytes. the least significant bytes (lsbs) of each word have even addresses, while the most significant bytes (msbs) have odd addresses. 4.2.2 data memory organization and alignment to maintain backward compatibility with pic ? mcu devices and improve data space memory usage efficiency, the dspic33epxxxgm3xx/6xx/7xx instruction set supports both word and byte operations. as a consequence of byte accessibility, all effective address calculations are internally scaled to step through word-aligned memory. for example, the core recognizes that post-modified register indirect addressing mode [ws++] results in a value of ws + 1 for byte operations and ws + 2 for word operations. a data byte read, reads the complete word that contains the byte, using the lsb of any ea to determine which byte to select. the selected byte is placed onto the lsb of the data path. that is, data memory and registers are organized as two parallel, byte-wide entities with shared (word) address decode but separate write lines. data byte writes only write to the corresponding side of the array or register that matches the byte address. all word accesses must be aligned to an even address. misaligned word data fetches are not supported, so care must be taken when mixing byte and word operations, or translating from 8-bit mcu code. if a misaligned read or write is attempted, an address error trap is generated. if the error occurred on a read, the instruction underway is completed. if the error occurred on a write, the instruction is executed but the write does not occur. in either case, a trap is then executed, allowing the system and/or user application to examine the machine state prior to execution of the address fault. all byte loads into any w register are loaded into the lsb; the msb is not modified. a sign-extend ( se ) instruction is provided to allow user applications to translate 8-bit signed data to 16-bit signed values. alternatively, for 16-bit unsigned data, user applications can clear the msb of any w register by executing a zero-extend ( ze ) instruction on the appropriate address. 4.2.3 sfr space the first 4 kbytes of the near data space, from 0x0000 to 0x0fff, is primarily occupied by special function registers (sfrs). these are used by the dspic33epxxxgm3xx/6xx/7xx core and peripheral modules for controlling the operation of the device. sfrs are distributed among the modules that they control and are generally grouped together by module. much of the sfr space contains unused addresses; these are read as 0 . 4.2.4 near data space the 8-kbyte area, between 0x0000 and 0x1fff, is referred to as the near data space. locations in this space are directly addressable through a 13-bit abso- lute address field within all memory direct instructions. additionally, the whole data space is addressable using mov instructions, which support memory direct addressing mode with a 16-bit address field, or by using indirect addressing mode using a working register as an address pointer. note: the actual set of peripheral features and interrupts varies by the device. refer to the corresponding device tables and pinout diagrams for device-specific information. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 42 ? 2013-2014 microchip technology inc. figure 4-5: data memory map for 128-kbyte devices 0x0000 0x0ffe 0x2ffe 0xfffe lsb address 16 bits lsb msb msb address 0x0001 0x0fff 0x2fff 0xffff optionally mapped into program memory space 0x4fff 0x4ffe 0x1001 0x1000 0x3001 0x3000 4-kbyte sfr space 16-kbyte sram space 0x5000 0x5001 space near data 8-kbyte 0x8000 0x8001 note: memory areas are not shown to scale. (via psv) 0x1ffe 0x1fff 0x2001 0x2000 sfr space x data ram (x) y data ram (y) x data unimplemented (x) downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 43 dspic33epxxxgm3xx/6xx/7xx figure 4-6: data memory map for 256-kbyte devices 0x0000 0x0ffe 0x4ffe 0xfffe lsb address 16 bits lsb msb msb address 0x0001 0x0fff 0x4fff 0xffff optionally mapped into program memory space 0x8fff 0x8ffe 0x1001 0x1000 0x5001 0x5000 4-kbyte sfr space 32-kbyte sram space 0x9000 0x9001 space near data 8-kbyte note: memory areas are not shown to scale. (via psv) 0x1ffe 0x1fff 0x2001 0x2000 0x7ffe 0x7fff 0x8001 0x8000 sfr space x data ram (x) y data ram (y) x data unimplemented (x) downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 44 ? 2013-2014 microchip technology inc. figure 4-7: data memory map for 512-kbyte devices 0x0000 0x0ffe 0x7ffe 0xfffe lsb address 16 bits lsb msb msb address 0x0001 0x0fff 0x7fff 0xffff optionally mapped into program memory space 0xefff 0xeffe 0x1001 0x1000 0x8001 0x8000 4-kbyte sfr space 48-kbyte sram space 0xd000 0xd001 space near data 8-kbyte note: memory areas are not shown to scale. (via psv) 0x1ffe 0x1fff 0x2001 0x2000 0x8ffe 0x8fff 0x9001 0x9000 x data unimplemented (x) sfr space x data ram (x) y data ram (y) downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 45 dspic33epxxxgm3xx/6xx/7xx 4.2.5 x and y data spaces the dspic33ep core has two data spaces: x and y. these data spaces can be considered either separate (for some dsp instructions) or as one unified linear address range (for mcu instructions). the data spaces are accessed using two address generation units (agus) and separate data paths. this feature allows certain instructions to concurrently fetch two words from ram, thereby enabling efficient execution of dsp algorithms, such as finite impulse response (fir) filtering and fast fourier transform (fft). the x data space is used by all instructions and supports all addressing modes. the x data space has separate read and write data buses. the x read data bus is the read data path for all instructions that view data space as combined x and y address space. it is also the x data prefetch path for the dual operand dsp instructions ( mac class). the y data space is used in concert with the x data space by the mac class of instructions ( clr , ed , edac , mac , movsac , mpy , mpy.n and msc ) to provide two concurrent data read paths. both the x and y data spaces support modulo addressing mode for all instructions, subject to addressing mode restrictions. bit-reversed addressing mode is only supported for writes to x data space. all data memory writes, including in dsp instructions, view data space as combined x and y address space. the boundary between the x and y data spaces is device-dependent and is not user-programmable. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 46 ? 2013-2014 microchip technology inc. 4.3 special function register maps table 4-1: cpu core register map sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets w0 0000 w0 (wreg) xxxx w1 0002 w1 xxxx w2 0004 w2 xxxx w3 0006 w3 xxxx w4 0008 w4 xxxx w5 000a w5 xxxx w6 000c w6 xxxx w7 000e w7 xxxx w8 0010 w8 xxxx w9 0012 w9 xxxx w10 0014 w10 xxxx w11 0016 w11 xxxx w12 0018 w12 xxxx w13 001a w13 xxxx w14 001c w14 xxxx w15 001e w15 xxxx splim 0020 splim 0000 accal 0022 accal 0000 accah 0024 accah 0000 accau 0026 sign extension of acca<39> accau 0000 accbl 0028 accbl 0000 accbh 002a accbh 0000 accbu 002c sign extension of accb<39> accbu 0000 pcl 002e program counter low word register 0000 pch 0030 program counter high word register 0000 dsrpag 0032 data space read page register 0001 dswpag 0034 data space write page register 0001 rcount 0036 repeat loop count register 0000 dcount 0038 dcount<15:0> 0000 dostartl 003a dostartl<15:1> 0000 dostarth 003c d o s t a r t h < 5 : 0 > 0000 doendl 003e doendl<15:1> 0000 doendh 0040 doendh<5:0> 0000 legend: x = unknown value on reset; = unimplemented, read as 0 . reset values are shown in hexadecimal. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 47 dspic33epxxxgm3xx/6xx/7xx sr 0042 oa ob sa sb oab sab da dc ipl2 ipl1 ipl0 ra n ov z c 0000 corcon 0044 var us1 us0 edt dl1 dl2 dl0 sata satb satdw accsat ipl3 sfa rnd if 0020 modcon 0046 xmoden ymoden bwm3 bwm2 bwm1 bwm0 ywm3 ywm2 ywm1 ywm0 xwm3 xwm2 xwm1 xwm0 0000 xmodsrt 0048 xmodsrt<15:0> 0000 xmodend 004a xmodend<15:0> 0001 ymodsrt 004c ymodsrt<15:0> 0000 ymodend 004e ymodend<15:0> 0001 xbrev 0050 bren xbrev<14:0> 0000 disicnt 0052 disicnt<13:0> 0000 tblpag 0054 t b l p a g < 7 : 0 > 0000 mstrpr 0058 mstrpr<15:0> 0000 table 4-1: cpu core register map (continued) sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets legend: x = unknown value on reset; = unimplemented, read as 0 . reset values are shown in hexadecimal. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 48 ? 2013-2014 microchip technology inc. table 4-2: interrupt controller register map for dspic33epxxxgm6xx/7xx devices sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets intcon1 08c0 nstdis ovaerr ovberr covaerr covberr ovate ovbte covte sftacerr div0err dmacerr matherr addrerr stkerr oscfail 0000 intcon2 08c2 gie disi swtrap int2ep int1ep int0ep 0000 intcon3 08c4 dae doovr 0000 intcon4 08c6 s g h t 0000 ifs0 0800 dma1if ad1if u1txif u1rxif spi1if spi1eif t3if t2if oc2if ic2if dma0if t1if oc1if ic1if int0if 0000 ifs1 0802 u2txif u2rxif int2if t5if t4if oc4if oc3if dma2if ic8if ic7if ad2if int1 if cnif cmpif mi2c1if si2c1if 0000 ifs2 0804 t6if p m p i f ( 1 ) oc8if oc7if oc6if oc5if ic6if ic5if ic4if ic3if dma3if c1if c1rxif spi2if spi2eif 0000 ifs3 0806 flt1if rtccif ( 2 ) dciif dcieif qei1if psemif c2if c2rxif int4if int3if t9if t8if mi2c2if si2c2 if t7if 0000 ifs4 0808 ctmuif flt4if qei2if flt3if psesmif c2txif c1txif crcif u2eif u1eif flt2if 0000 ifs5 080a pwm2if pwm1if spi3if spi3eif u4txif u4rxif u4eif u3txif u3rxif u3eif 0000 ifs6 080c pwm6if pwm5if pwm4if pwm3if 0000 ifs8 0810 jtagif icdif 0000 ifs9 0812 ptg3if ptg2if ptg1if ptg0if ptgwdtif ptgstepif 0000 iec0 0820 dma1ie ad1ie u1txie u1rxie spi1ie spi1eie t3ie t2ie oc2ie ic2ie dma0ie t1ie oc1ie ic1 ie int0ie 0000 iec1 0822 u2txie u2rxie int2ie t5ie t4ie oc4ie oc3ie dma2ie ic8ie ic7ie ad2ie in t1ie cnie cmpie mi2c1ie si2c1ie 0000 iec2 0824 t6ie p m p i e ( 1 ) oc8ie oc7ie oc6ie oc5ie ic6ie ic5ie ic4ie ic3ie dma3ie c1ie c1rxie spi2ie spi2eie 0000 iec3 0826 flt1ie rtccie ( 2 ) dciie dcieie qei1ie psemie c2ie c2rxie int4ie int3ie t9ie t8ie mi2c2ie si2c2ie t7ie 0000 iec4 0828 ctmuie flt4ie qei2ie flt3ie psesmie c2txie c1txie crcie u2eie u1eie flt2ie 0000 iec5 082a pwm2ie pwm1ie spi3ie spi3eie u4txie u4rxie u4eie u3txie u3rxie u3eie 0000 iec6 082c pwm6ie pwm5ie pwm4ie pwm3ie 0000 iec8 0830 jtagie icdie 0000 iec9 0832 ptg3ie ptg2ie ptg1ie ptg0ie ptgwdtie ptgstepie 0000 ipc0 0840 t1ip2 t1ip1 t1ip0 oc1ip2 oc1ip1 oc1ip0 ic1ip2 ic1ip1 ic1ip0 int0ip2 int0ip1 int0ip2 4444 ipc1 0842 t2ip2 t2ip1 t2ip0 oc2ip2 oc2ip1 oc2ip0 ic2ip2 ic2ip1 ic2ip0 dma0ip2 dma0ip1 dma0ip2 4444 ipc2 0844 u1rxip2 u1rxip1 u1rxip0 spi1ip2 spi1ip1 spi1ip0 spi1eip2 spi1eip1 spi1eip0 t3ip2 t3ip1 t3ip0 4444 ipc3 0846 dma1ip2 dma1ip1 dma1ip0 ad1ip2 ad1ip1 ad1ip0 u1txip2 u1txip1 u1txip0 4444 ipc4 0848 cnip2 cnip1 cnip0 cmpip2 cmpip1 cmpip0 mi2c1ip2 mi2c1ip1 mi2c1ip0 si2c1ip2 si2c1ip1 si2c1ip0 4444 ipc5 084a ic8ip2 ic8ip1 ic8ip0 ic7ip2 ic7ip1 ic7ip0 ad2ip2 ad2ip1 ad2ip0 int1ip2 int1ip1 int1ip0 4444 ipc6 084c t4ip2 t4ip1 t4ip0 oc4ip2 oc4ip1 oc4ip0 oc3ip2 oc3ip1 oc3ip0 dma2ip2 dma2ip1 dma2ip0 4444 ipc7 084e u2txip2 u2txip1 u2txip0 u2rxip2 u2rxip1 u2rxip0 int2ip2 int2ip1 int2ip0 t5ip2 t5ip1 t5ip0 4444 ipc8 0850 c1ip2 c1ip1 c1ip0 c1rxip2 c1rxip1 c1rxip0 spi2ip2 spi2ip1 spi2ip0 spi2eip2 spi2eip1 spi2eip0 4444 ipc9 0852 ic5ip2 ic5ip1 ic5ip0 ic4ip2 ic4ip1 ic4ip0 ic3ip2 ic3ip1 ic3ip0 dma3ip2 dma3ip1 dma3ip0 4444 ipc10 0854 oc7ip2 oc7ip1 oc7ip0 oc6ip2 oc6ip1 oc6ip0 oc5ip2 oc5ip1 oc5ip0 ic6ip2 ic6ip1 ic6ip0 4444 legend: = unimplemented, read as 0 . reset values are shown in hexadecimal. note 1: the pmpif/pmpie/pmpipx flags are not available on 44-pin devices. 2: the rtccif/rtccie/rtccipx flags are not available on 44-pin devices. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 49 dspic33epxxxgm3xx/6xx/7xx ipc11 0856 t6ip2 t6ip1 t6ip0 p m p i p 2 ( 1 ) pmpip1 ( 1 ) pmpip0 ( 1 ) oc8ip2 oc8ip1 oc8ip0 4444 ipc12 0858 t8ip2 t8ip1 t8ip0 mi2c2ip2 mi2c2ip1 mi2c2ip0 si2c2ip2 si2c2ip1 si2c2ip0 t7ip2 t7ip1 t7ip0 4444 ipc13 085a c2rxip2 c2rxip1 c2rxip0 int4ip2 int4ip1 int4ip0 int3ip2 int3ip1 int3ip0 t9ip2 t9ip1 t9ip0 4444 ipc14 085c dcieip2 dcieip1 dcieip0 qei1ip2 qei1ip2 qei1ip0 pcepip2 pcepip1 pcepip0 c2ip2 c2ip1 c2ip0 4444 ipc15 085e flt1ip2 flt1ip1 flt1ip0 r t c c i p 2 ( 2 ) rtccip1 ( 2 ) rtccip0 ( 2 ) dciip2 dciip1 dciip0 0404 ipc16 0860 crcip2 crcip1 crcip0 u2eip2 u2eip1 u2eip0 u1eip2 u1eip1 u1eip0 flt2ip2 flt2ip1 flt2ip0 4440 ipc17 0862 c2txip2 c2txip1 c2txip0 c1txip2 c1txip1 c1txip0 4400 ipc18 0864 qei2ip2 qei2ip1 qei2ip0 flt3ip2 flt3ip1 flt3i p0 pcesip2 pcesip1 pcesip0 4040 ipc19 0866 ctmuip2 ctmuip1 ctmuip0 flt4ip2 flt4ip1 flt4ip0 4000 ipc20 0868 u3txip2 u3txip1 u3txip0 u3rxip2 u3rxip1 u3rxip0 u3eip2 u3eip1 u3eip0 0000 ipc21 086a u4eip2 u4eip1 u4eip0 0000 ipc22 086c spi3ip2 spi3ip1 spi3ip0 spi3eip2 spi3eip1 spi3eip0 u4txip2 u4txip1 u4txip0 u4rxip2 u4rxip1 u4rxip0 0000 ipc23 086e pgc2ip2 pgc2ip1 pgc2ip0 pwm1ip2 pwm1ip1 pwm1ip0 4400 ipc24 0870 pwm6ip2 pwm6ip1 pwm6ip0 pwm5ip2 pwm5ip1 pwm5ip0 pwm4ip2 pwm4ip1 pwm4ip0 pwm3ip2 pwm3ip1 pwm3ip0 4444 ipc35 0886 jtagip2 jtagip1 jtagip0 icdip2 icdip1 icdip0 4400 ipc36 0888 ptg0ip2 ptg0ip1 ptg0ip0 ptgwdtip2 ptgwdtip1 ptgwdtip0 ptgstepip2 ptgstepip1 ptgstepip0 4440 ipc37 088a ptg3ip2 ptg3ip1 ptg3ip0 ptg2ip2 ptg2ip1 ptg2ip0 ptg1ip2 ptg1ip1 ptg1ip0 0445 inttreg 08c8 ilr3 ilr2 ilr1 ilr0 vecnum7 vecnum6 vecnum5 vecnum4 vecnum3 vecnum2 vecnum1 vecnum0 0000 table 4-2: interrupt controller register map for dspic33epxxxgm6xx/7xx devices (continued) sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets legend: = unimplemented, read as 0 . reset values are shown in hexadecimal. note 1: the pmpif/pmpie/pmpipx flags are not available on 44-pin devices. 2: the rtccif/rtccie/rtccipx flags are not available on 44-pin devices. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 50 ? 2013-2014 microchip technology inc. table 4-3: interrupt controller register map for dspic33epxxxgm3xx devices sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 b it 0 all resets intcon1 08c0 nstdis ovaerr ovberr covaerr covberr ovate ovbte covte sftacerr div0err dmacerr matherr addrerr stkerr oscfail 0000 intcon2 08c2 gie disi swtrap int2ep int1ep int0ep 0000 intcon3 08c4 dae doovr 0000 intcon4 08c6 s g h t 0000 ifs0 0800 dma1if ad1if u1txif u1rxif spi1if spi1eif t3if t2if oc2if ic2if dma0if t1if oc1 if ic1if int0if 0000 ifs1 0802 u2txif u2rxif int2if t5if t4if oc4if oc3if dma2if ic8if ic7if ad2if int1if cnif cmpif mi2c1if si2c1if 0000 ifs2 0804 t6if p m p i f ( 1 ) oc8if oc7if oc6if oc5if ic6if ic5if ic4if ic3if dma3if s p i 2 i fs p i 2 e i f 0000 ifs3 0806 flt1if rtccif ( 2 ) dciif dcieif qei1if psemif int4if int3if t9if t8if mi2c2if si2c2if t7if 0000 ifs4 0808 ctmuif flt4if qei2if flt3if psesmif crcif u2eif u1eif flt2if 0000 ifs5 080a pwm2if pwm1if spi3if spi3eif u4txif u4rxif u4eif u3txif u3rxif u3eif 0000 ifs6 080c pwm6if pwm5if pwm4if pwm3if 0000 ifs8 0810 jtagif icdif 0000 ifs9 0812 ptg3if ptg2if ptg1if ptg0if ptgwdtif ptgstepif 0000 iec0 0820 dma1ie ad1ie u1txie u1rxie spi1ie spi1eie t3ie t2ie oc2ie ic2ie dma0ie t 1ie oc1ie ic1ie int0ie 0000 iec1 0822 u2txie u2rxie int2ie t5ie t4ie oc4ie oc3ie dma2ie ic8ie ic7ie ad2ie in t1ie cnie cmpie mi2c1ie si2c1ie 0000 iec2 0824 t6ie p m p i e ( 1 ) oc8ie oc7ie oc6ie oc5ie ic6ie ic5ie ic4ie ic3ie dma3ie s p i 2 i es p i 2 e i e 0000 iec3 0826 flt1ie rtccie ( 2 ) dciie dcieie qei1ie psemie int4ie int3ie t9ie t8ie mi2c2ie si2c2ie t7ie 0000 iec4 0828 ctmuie flt4ie qei2ie flt3ie psesmie crcie u2eie u1eie flt2ie 0000 iec5 082a pwm2ie pwm1ie spi3ie spi3eie u4txie u4rxie u4eie u3txie u3rxie u3eie 0000 iec6 082c pwm6ie pwm5ie pwm4ie pwm3ie 0000 iec8 0830 jtagie icdie 0000 iec9 0832 ptg3ie ptg2ie ptg1ie ptg0ie ptgwdtie ptgstepie 0000 ipc0 0840 t1ip2 t1ip1 t1ip0 oc1ip2 oc1ip1 oc1ip0 ic1ip2 ic1ip1 ic1ip0 int0ip2 int0ip1 int0ip2 4444 ipc1 0842 t2ip2 t2ip1 t2ip0 oc2ip2 oc2ip1 oc2ip0 ic2ip2 ic2ip1 ic2ip0 dma0ip2 dma0ip1 dma0ip2 4444 ipc2 0844 u1rxip2 u1rxip1 u1rxip0 spi1ip2 spi1ip1 spi1ip0 spi1eip2 spi1eip1 spi1eip0 t3ip2 t3ip1 t3ip0 4444 ipc3 0846 dma1ip2 dma1ip1 dma1ip0 ad1ip2 ad1ip1 ad1ip0 u1txip2 u1txip1 u1txip0 4444 ipc4 0848 cnip2 cnip1 cnip0 cmpip2 cmpip1 cmpip0 mi2c1ip2 mi2c1ip1 mi2c1ip0 si2c1ip2 si2c1ip1 si2c1ip0 4444 ipc5 084a ic8ip2 ic8ip1 ic8ip0 ic7ip2 ic7ip1 ic7ip0 ad2ip2 ad2ip1 ad2ip0 int1ip2 int1ip1 int1ip0 4444 ipc6 084c t4ip2 t4ip1 t4ip0 oc4ip2 oc4ip1 oc4ip0 oc3ip2 oc3ip1 oc3ip0 dma2ip2 dma2ip1 dma2ip0 4444 ipc7 084e u2txip2 u2txip1 u2txip0 u2rxip2 u2rxip1 u2rxip0 int2ip2 int2ip1 int2ip0 t5ip2 t5ip1 t5ip0 4444 ipc8 0850 spi2ip2 spi2ip1 spi2ip0 spi2eip2 spi2eip1 spi2eip0 4444 ipc9 0852 ic5ip2 ic5ip1 ic5ip0 ic4ip2 ic4ip1 ic4ip0 ic3ip2 ic3ip1 ic3ip0 dma3ip2 dma3ip1 dma3ip0 4444 ipc10 0854 oc7ip2oc7ip1oc7ip0 oc6ip2 oc6ip1 oc6ip0 oc5ip2 oc5ip1 oc5ip0 ic6ip2 ic6ip1 ic6ip0 4444 legend: = unimplemented, read as 0 . reset values are shown in hexadecimal. note 1: the pmpif/pmpie/pmpipx flags are not available on 44-pin devices. 2: the rtccif/rtccie/rtccipx flags are not available on 44-pin devices. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 51 dspic33epxxxgm3xx/6xx/7xx ipc11 0856 t6ip2 t6ip1 t6ip0 p m p i p 2 ( 1 ) pmpip1 ( 1 ) pmpip0 ( 1 ) oc8ip2 oc8ip1 oc8ip0 4444 ipc12 0858 t8ip2 t8ip1 t8ip0 mi2c2ip2 mi2c2ip1 mi2c2ip0 si2c2ip2 si2c2ip1 si2c2ip0 t7ip2 t7ip1 t7ip0 4444 ipc13 085a int4ip2 int4ip1 int4ip0 int3ip2 int3ip1 int3ip0 t9ip2 t9ip1 t9ip0 4444 ipc14 085c dcieip2 dcieip1 dcieip0 qei1ip2 qei1ip2 qei1ip0 pcepip2 pcepip1 pcepip0 4444 ipc15 085e flt1i p2 flt1ip1 flt1i p0 r t c c i p 2 ( 2 ) rtccip1 ( 2 ) rtccip0 ( 2 ) dciip2 dciip1 dciip0 0404 ipc16 0860 crcip2 crcip1 crcip0 u2eip2 u2eip1 u2eip0 u1eip2 u1eip1 u1eip0 flt2ip2 flt2ip1 flt2ip0 4440 ipc18 0864 c2txip2 c2txip1 c2txip0 flt3ip2 flt3ip1 flt3ip0 pcesip2 pcesip1 pcesip0 4040 ipc19 0866 ctmuip2 ctmuip1 ctmuip0 flt4ip2 flt4ip1 flt4ip0 0004 ipc20 0868 u3txip2 u3txip1 u3txip0 u3rxip2 u3rxip1 u3rxip0 u3eip2 u3eip1 u3eip0 0000 ipc21 086a u4eip2 u4eip1 u4eip0 0000 ipc22 086c spi3ip2 spi3ip1 spi3ip0 spi3eip2 spi3eip1 spi3eip0 u4txip2 u4txip1 u4txip0 u4rxip2 u4rxip1 u4rxip0 0000 ipc23 086e pgc2ip2 pgc2ip1 pgc2ip0 pwm1ip2 pwm1ip1 pwm1ip0 4400 ipc24 0870 pwm6ip2 pwm6ip1 pwm6ip0 pwm5ip2 pwm5ip1 pwm5ip0 pwm4ip2 pwm4ip1 pwm4ip0 pwm3ip2 pwm3ip1 pwm3ip0 4444 ipc35 0886 jtagip2 jtagip1 jtagip0 icdip2 icdip1 icdip0 4400 ipc36 0888 ptg0ip2 ptg0ip1 ptg0ip0 ptgwdtip2 ptgwdtip1 ptgwdtip0 ptgstepip2 ptgstepip1 ptgstepip0 4440 ipc37 088a ptg3ip2 ptg3ip1 ptg3ip0 ptg2ip2 ptg2ip1 ptg2ip0 ptg1ip2 ptg1ip1 ptg1ip0 0444 inttreg 08c8 ilr3 ilr2 ilr1 ilr0 vecnum7 vecnum6 vecnum5 vecnum4 vecnum3 vecnum2 vecnum1 vecnum0 0000 table 4-3: interrupt controller register map for dspic33epxxxgm3xx devices (continued) sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 b it 0 all resets legend: = unimplemented, read as 0 . reset values are shown in hexadecimal. note 1: the pmpif/pmpie/pmpipx flags are not available on 44-pin devices. 2: the rtccif/rtccie/rtccipx flags are not available on 44-pin devices. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 52 ? 2013-2014 microchip technology inc. table 4-4: timers register map sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets tmr1 0100 timer1 register 0000 pr1 0102 period register 1 ffff t1con 0104 ton t s i d l tgate tckps1 tckps0 tsync tcs 0000 tmr2 0106 timer2 register 0000 tmr3hld 0108 timer3 holding register (for 32-bit timer operations only) xxxx tmr3 010a timer3 register 0000 pr2 010c period register 2 ffff pr3 010e period register 3 ffff t2con 0110 ton t s i d l tgate tckps1 tckps0 t32 t c s 0000 t3con 0112 ton t s i d l tgate tckps1 tckps0 t c s 0000 tmr4 0114 timer4 register 0000 tmr5hld 0116 timer5 holding register (for 32-bit timer operations only) xxxx tmr5 0118 timer5 register 0000 pr4 011a period register 4 ffff pr5 011c period register 5 ffff t4con 011e ton t s i d l tgate tckps1 tckps0 t32 t c s 0000 t5con 0120 ton t s i d l tgate tckps1 tckps0 t c s 0000 tmr6 0122 timer6 register 0000 tmr7hld 0124 timer7 holding register (for 32-bit timer operations only) xxxx tmr7 0126 timer7 register 0000 pr6 0128 period register 6 ffff pr7 012a period register 7 ffff t6con 012c ton t s i d l tgate tckps1 tckps0 t32 t c s 0000 t7con 012e ton t s i d l tgate tckps1 tckps0 t c s 0000 tmr8 0130 timer8 register 0000 tmr9hld 0132 timer9 holding register (for 32-bit timer operations only) xxxx tmr9 0134 timer9 register 0000 pr8 0136 period register 8 ffff pr9 0138 period register 9 ffff t8con 013a ton t s i d l tgate tckps1 tckps0 t32 t c s 0000 t9con 013c ton t s i d l tgate tckps1 tckps0 t c s 0000 legend: x = unknown value on reset; = unimplemented, read as 0 . reset values are shown in hexadecimal. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 53 dspic33epxxxgm3xx/6xx/7xx table 4-5: input capture 1 throug h input capture 8 register map sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets ic1con1 0140 icsidl ictsel2 ictsel1 ictsel0 ici1 ici0 icov icbne icm2 icm1 icm0 0000 ic1con2 0142 ic32 ictrig trigstat syncsel4 syncsel3 syncsel2 syncsel1 syncsel0 000d ic1buf 0144 input capture 1 buffer register xxxx ic1tmr 0146 input capture 1 timer register 0000 ic2con1 0148 icsidl ictsel2 ictsel1 ictsel0 ici1 ici0 icov icbne icm2 icm1 icm0 0000 ic2con2 014a ic32 ictrig trigstat syncsel4 syncsel3 syncsel2 syncsel1 syncsel0 000d ic2buf 014c input capture 2 buffer register xxxx ic2tmr 014e input capture 2 timer register 0000 ic3con1 0150 icsidl ictsel2 ictsel1 ictsel0 ici1 ici0 icov icbne icm2 icm1 icm0 0000 ic3con2 0152 ic32 ictrig trigstat syncsel4 syncsel3 syncsel2 syncsel1 syncsel0 000d ic3buf 0154 input capture 3 buffer register xxxx ic3tmr 0156 input capture 3 timer register 0000 ic4con1 0158 icsidl ictsel2 ictsel1 ictsel0 ici1 ici0 icov icbne icm2 icm1 icm0 0000 ic4con2 015a ic32 ictrig trigstat syncsel4 syncsel3 syncsel2 syncsel1 syncsel0 000d ic4buf 015c input capture 4 buffer register xxxx ic4tmr 015e input capture 4 timer register 0000 ic5con1 0160 icsidl ictsel2 ictsel1 ictsel0 ici1 ici0 icov icbne icm2 icm1 icm0 0000 ic5con2 0162 ic32 ictrig trigstat syncsel4 syncsel3 syncsel2 syncsel1 syncsel0 000d ic5buf 0164 input capture 5 buffer register xxxx ic5tmr 0166 input capture 5 timer register 0000 ic6con1 0168 icsidl ictsel2 ictsel1 ictsel0 ici1 ici0 icov icbne icm2 icm1 icm0 0000 ic6con2 016a ic32 ictrig trigstat syncsel4 syncsel3 syncsel2 syncsel1 syncsel0 000d ic6buf 016c input capture 6 buffer register xxxx ic6tmr 016e input capture 6 timer register 0000 ic7con1 0170 icsidl ictsel2 ictsel1 ictsel0 ici1 ici0 icov icbne icm2 icm1 icm0 0000 ic7con2 0172 ic32 ictrig trigstat syncsel4 syncsel3 syncsel2 syncsel1 syncsel0 000d ic7buf 0174 input capture 7 buffer register xxxx ic7tmr 0176 input capture 7 timer register 0000 ic8con1 0178 icsidl ictsel2 ictsel1 ictsel0 ici1 ici0 icov icbne icm2 icm1 icm0 0000 ic8con2 017a ic32 ictrig trigstat syncsel4 syncsel3 syncsel2 syncsel1 syncsel0 000d ic8buf 017c input capture 8 buffer register xxxx ic8tmr 017e input capture 8 timer register 0000 legend: x = unknown value on reset; = unimplemented, read as 0 . reset values are shown in hexadecimal. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 54 ? 2013-2014 microchip technology inc. table 4-6: output compare register map sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets oc1con1 0900 ocsidl octsel2 octsel1 octsel0 enfltb enflta ocfltb ocflta trigmode ocm2 ocm1 ocm0 0000 oc1con2 0902 fltmd fltout flttrien ocinv oc32 octrig trigstat octris syncsel4 syncsel3 syncsel2 syncsel1 syncsel0 000c oc1rs 0904 output compare 1 secondary register xxxx oc1r 0906 output compare 1 register xxxx oc1tmr 0908 output compare 1 timer value register xxxx oc2con1 090a ocsidl octsel2 octsel1 octsel0 enfltb enflta ocfltb ocflta trigmode ocm2 ocm1 ocm0 0000 oc2con2 090c fltmd fltout flttrien ocinv oc32 octrig trigstat octris syncsel4 syncsel3 syncsel2 syncsel1 syncsel0 000c oc2rs 090e output compare 2 secondary register xxxx oc2r 0910 output compare 2 register xxxx oc2tmr 0912 output compare 2 timer value register xxxx oc3con1 0914 ocsidl octsel2 octsel1 octsel0 enfltb enflta ocfltb ocflta trigmode ocm2 ocm1 ocm0 0000 oc3con2 0916 fltmd fltout flttrien ocinv oc32 octrig trigstat octris syncsel4 syncsel3 syncsel2 syncsel1 syncsel0 000c oc3rs 0918 output compare 3 secondary register xxxx oc3r 091a output compare 3 register xxxx oc3tmr 091c output compare 3 timer value register xxxx oc4con1 091e ocsidl octsel2 octsel1 octsel0 enfltb enflta ocfltb ocflta trigmode ocm2 ocm1 ocm0 0000 oc4con2 0920 fltmd fltout flttrien ocinv oc32 octrig trigstat octris syncsel4 syncsel3 syncsel2 syncsel1 syncsel0 000c oc4rs 0922 output compare 4 secondary register xxxx oc4r 0924 output compare 4 register xxxx oc4tmr 0926 output compare 4 timer value register xxxx oc5con1 0928 ocsidl octsel2 octsel1 octsel0 enfltb enflta ocfltb ocflta trigmode ocm2 ocm1 ocm0 0000 oc5con2 092a fltmd fltout flttrien ocinv oc32 octrig trigstat octris syncsel4 syncsel3 syncsel2 syncsel1 syncsel0 000c oc5rs 092c output compare 5 secondary register xxxx oc5r 092e output compare 5 register xxxx oc5tmr 0930 output compare 5 timer value register xxxx oc6con1 0932 ocsidl octsel2 octsel1 octsel0 enfltb enflta ocfltb ocflta trigmode ocm2 ocm1 ocm0 0000 oc6con2 0934 fltmd fltout flttrien ocinv oc32 octrig trigstat octris syncsel4 syncsel3 syncsel2 syncsel1 syncsel0 000c oc6rs 0936 output compare 6 secondary register xxxx oc6r 0938 output compare 6 register xxxx oc6tmr 093a output compare 6 timer value register xxxx legend: x = unknown value on reset; = unimplemented, read as 0 . reset values are shown in hexadecimal. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 55 dspic33epxxxgm3xx/6xx/7xx oc7con1 093c ocsidl octsel2 octsel1 octsel0 enfltb enflta ocfltb ocflta trigmode ocm2 ocm1 ocm0 0000 oc7con2 093e fltmd fltout flttrien ocinv oc32 octrig trigstat octris syncsel4 syncsel3 syncsel2 syncsel1 syncsel0 000c oc7rs 0940 output compare 7 secondary register xxxx oc7r 0942 output compare 7 register xxxx oc7tmr 0944 output compare 7 timer value register xxxx oc8con1 0946 ocsidl octsel2 octsel1 octsel0 enfltb enflta ocfltb ocflta trigmode ocm2 ocm1 ocm0 0000 oc8con2 0948 fltmd fltout flttrien ocinv oc32 octrig trigstat octris syncsel4 syncsel3 syncsel2 syncsel1 syncsel0 000c oc8rs 094a output compare 8 secondary register xxxx oc8r 094c output compare 8 register xxxx oc8tmr 094e output compare 8 timer value register xxxx table 4-6: output compare register map (continued) sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets legend: x = unknown value on reset; = unimplemented, read as 0 . reset values are shown in hexadecimal. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 56 ? 2013-2014 microchip technology inc. table 4-7: ptg register map sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bi t 1 bit 0 all resets ptgcst 0ac0 ptgen ptgsidl ptgtogl ptgswt ptgssen ptgivis ptgstrt ptgwdto ptgitm1 ptgitm0 0000 ptgcon 0ac2 ptgclk2 ptgclk1 ptgclk0 ptgdiv4 ptgdiv3 ptg div2 ptgdiv1 ptgdiv0 ptgpwd3 ptgpwd2 ptgpwd1 ptgpwd0 ptgwdt2 ptgwdt1 ptgwdt0 0000 ptgbte 0ac4 adcts4 adcts3 adcts2 adcts1 ic4tss ic3tss ic2tss ic1tss oc4cs oc3cs oc2cs oc1cs oc4tss oc3tss oc2tss oc1tss 0000 ptghold 0ac6 ptghold<15:0> 0000 ptgt0lim 0ac8 ptgt0lim<15:0> 0000 ptgt1lim 0aca ptgt1lim<15:0> 0000 ptgsdlim 0acc ptgsdlim<15:0> 0000 ptgc0lim 0ace ptgc0lim<15:0> 0000 ptgc1lim 0ad0 ptgc1lim<15:0> 0000 ptgadj 0ad2 ptgadj<15:0> 0000 ptgl0 0ad4 ptgl0<15:0> 0000 ptgqptr 0ad6 ptgqptr<4:0> 0000 ptgque0 0ad8 step1<7:0> step0<7:0> 0000 ptgque1 0ada step3<7:0> step2<7:0> 0000 ptgque2 0adc step5<7:0> step4<7:0> 0000 ptgque3 0ade step7<7:0> step6<7:0> 0000 ptgque4 0ae0 step9<7:0> step8<7:0> 0000 ptgque5 0ae2 step11<7:0> step10<7:0> 0000 ptgque6 0ae4 step13<7:0> step12<7:0> 0000 ptgque7 0ae6 step15<7:0> step14<7:0> 0000 ptgque8 0x0ae8 step17<7:0> step16<7:0> 0000 ptgque9 0x0aea step19<7:0> step18<7:0> 0000 ptgque10 0x0aec step21<7:0> step20<7:0> 0000 ptgque11 0x0aee step23<7:0> step22<7:0> 0000 ptgque12 0x0af0 step25<7:0> step24<7:0> 0000 ptgque13 0x0af2 step27<7:0> step26<7:0> 0000 ptgque14 0x0af4 step29<7:0> step28<7:0> 0000 ptgque15 0x0af6 step31<7:0> step30<7:0> 0000 legend: x = unknown value on reset; = unimplemented, read as 0 . reset values are shown in hexadecimal. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 57 dspic33epxxxgm3xx/6xx/7xx table 4-8: pwm register map sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets ptcon 0c00 pten ptsidl sestat seien eipu syncpol syncoen syncen syncsrc2 syncsrc1 syncsrc0 sevtps3 sevtps2 sevtps1 sevtps0 0000 ptcon2 0c02 p c l k d i v < 2 : 0 > 0000 ptper 0c04 ptper<15:0> 00f8 sevtcmp 0c06 sevtcmp<15:0> 0000 mdc 0c0a mdc<15:0> 0000 stcon 0c0e sestat seien eipu syncpol syncoen syncen syncsrc2 syncsrc1 syncsrc0 sevtps3 sevtps2 sevtps1 sevtps0 0000 stcon2 0c10 p c l k d i v < 2 : 0 > 0000 stper 0c12 stper<15:0> 0000 ssevtcmp 0c14 ssevtcmp<15:0> 0000 chop 0c1a chpclken chopclk9 chopclk8 chopclk7 chopclk6 chopclk5 chopclk4 chopclk3 chopclk2 chopclk1 chopclk0 0000 pwmkey 0c1e pwmkey<15:0> 0000 legend: = unimplemented, read as 0 . reset values are shown in hexadecimal. table 4-9: pwm generator 1 register map sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets pwmcon1 0c20 fltstat clstat trgstat fltien clien trgien itb mdcs dtc1 dtc0 dtcp mtbs cam xpres iue 0000 iocon1 0c22 penh penl polh poll pmod1 pmod0 ovrenh ovrenl ovrdat1 ovrdat0 fltdat1 fltdat0 cldat1 cldat0 s wap osync c000 fclcon1 0c24 ifltmod clsrc4 clsrc3 clsrc2 clsrc1 clsrc0 clpol clmod fltsrc4 fltsrc3 fltsrc2 fltsrc1 flt src0 fltpol fltmod1 fltmod0 0000 pdc1 0c26 pdc1<15:0> fff8 phase1 0c28 phase1<15:0> 0000 dtr1 0c2a dtr1<13:0> 0000 altdtr1 0c2c altdtr1<13:0> 0000 sdc1 0c2e sdc1<15:0> 0000 sphase1 0c30 sphase1<15:0> 0000 trig1 0c32 trgcmp<15:0> 0000 trgcon1 0c34 trgdiv3 trgdiv2 trgdiv1 trgdiv0 trgstrt5 trgstrt4 trgstrt3 trgstrt2 trgstrt1 trgstrt0 0000 pwmcap1 0c38 pwmcap1<15:0> 0000 lebcon1 0c3a phr phf plr plf fltleben clleben bch bcl bphh bphl bplh bpll 0000 lebdly1 0c3c leb<11:0> 0000 auxcon1 0c3e blanksel3 blanksel2 blanksel1 blanksel0 chopsel3 chopsel2 chopsel1 chopsel0 chophen choplen 0000 legend: = unimplemented, read as 0 . reset values are shown in hexadecimal. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 58 ? 2013-2014 microchip technology inc. table 4-10: pwm generator 2 register map sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets pwmcon2 0c40 fltstat clstat trgstat fltien clien trgien itb mdcs dtc1 dtc0 dtcp mtbs cam xpres iue 0000 iocon2 0c42 penh penl polh poll pmod1 pmod0 ovrenh ovrenl ovrdat1 ovrdat0 fltdat1 fltdat0 cldat1 clda t0 swap osync c000 fclcon2 0c44 ifltmod clsrc4 clsrc3 clsrc2 clsrc1 clsrc0 clpol clmod fltsrc4 fltsrc3 fltsrc2 fltsrc1 fltsrc0 fltpol fl tmod1 fltmod0 00f8 pdc2 0c46 pdc2<15:0> 0000 phase2 0c48 phase2<15:0> 0000 dtr2 0c4a dtr2<13:0> 0000 altdtr2 0c4c altdtr2<13:0> 0000 sdc2 0c4e sdc2<15:0> 0000 sphase2 0c50 sphase2<15:0> 0000 trig2 0c52 trgcmp<15:0> 0000 trgcon2 0c54 trgdiv3 trgdiv2 trgdiv1 trgdiv0 trgstrt5 trgstrt4 trgstrt3 trgstrt2 trgstrt1 trgstrt0 0000 pwmcap2 0c78 pwmcap2<15:0> 0000 lebcon2 0c5a phr phf plr plf fltleben clleben bch bcl bphh bphl bplh bpll 0000 lebdly2 0c5c leb<11:0> 0000 auxcon2 0c5e blanksel3 blanksel2 blanksel1 blanksel0 chopsel3 chopsel2 chopsel1 chopsel0 chophen choplen 0000 legend: = unimplemented, read as 0 . reset values are shown in hexadecimal. table 4-11: pwm generator 3 register map sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets pwmcon3 0c60 fltstat clstat trgstat fltien clien trgien itb mdcs dtc1 dtc0 dtcp mtbs cam xpres iue 0000 iocon3 0c62 penh penl polh poll pmod1 pmod0 ovrenh ovrenl ovrdat1 ovrdat0 fltdat1 fltdat0 cldat1 cldat0 swap osync c000 fclcon3 0c64 ifltmod clsrc4 clsrc3 clsrc2 clsrc1 clsrc0 clpol clmod fltsrc4 fltsrc3 fltsrc2 fltsrc1 flt src0 fltpol fltmod1 fltmod0 00f8 pdc3 0c66 pdc3<15:0> 0000 phase3 0c68 phase3<15:0> 0000 dtr3 0c6a dtr3<13:0> 0000 altdtr3 0c6c altdtr3<13:0> 0000 sdc3 0c6e sdc3<15:0> 0000 sphase3 0c70 sphase3<15:0> 0000 trig3 0c72 trgcmp<15:0> 0000 trgcon3 0c74 trgdiv3 trgdiv2 trgdiv1 trgdiv0 trgstrt5 trgstrt4 trgstrt3 trgstrt2 trgstrt1 trgstrt0 0000 pwmcap3 0c78 pwmcap3<15:0> 0000 lebcon3 0c7a phr phf plr plf fltleben clleben bch bcl bphh bphl bplh bpll 0000 lebdly3 0c7c leb<11:0> 0000 auxcon3 0c7e blanksel3 blanksel2 blanksel1 blanksel0 chopsel3 chopsel2 chopsel1 chopsel0 chophen choplen 0000 legend: = unimplemented, read as 0 . reset values are shown in hexadecimal. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 59 dspic33epxxxgm3xx/6xx/7xx table 4-12: pwm generator 4 register map sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets pwmcon4 0c80 fltstat clstat trgstat fltien clien trgien itb mdcs dtc1 dtc0 dtcp mtbs cam xpres iue 0000 iocon4 0c82 penh penl polh poll pmod1 pmod0 ovrenh ovrenl ovrdat1 ovrdat0 fltdat1 fltdat0 cldat1 cldat0 swa p osync c000 fclcon4 0c84 ifltmod clsrc4 clsrc3 clsrc2 clsrc1 clsrc0 clpol clmod fltsrc4 fltsrc3 fltsrc2 fltsrc1 fltsrc0 fltpol fltmod1 flt mod0 00f8 pdc4 0c86 pdc3<15:0> 0000 phase4 0c88 phase3<15:0> 0000 dtr4 0c8a dtr3<13:0> 0000 altdtr4 0c8c altdtr3<13:0> 0000 sdc4 0c8e sdc4<15:0> 0000 sphase4 0c90 sphase4<15:0> 0000 trig4 0c92 trgcmp<15:0> 0000 trgcon4 0c94 trgdiv3 trgdiv2 trgdiv1 trgdiv0 trgstrt5 trgstrt4 trgstrt3 trgstrt2 trgstrt1 trgstrt0 0000 pwmcap4 0c98 pwmcap4<15:0> 0000 lebcon4 0c9a phr phf plr plf fltleben clleben bch bcl bphh bphl bplh bpll 0000 lebdly4 0c9c leb<11:0> 0000 auxcon4 0c9e blanksel3 blanksel2 blanksel1 blanksel0 chopsel3 chopsel2 chopsel1 chopsel0 chophen choplen 0000 legend: = unimplemented, read as 0 . reset values are shown in hexadecimal. table 4-13: pwm generator 5 register map sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 b it 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets pwmcon5 0ca0 fltstat clstat trgstat fltien clien trgien itb mdcs dtc1 dtc0 dtcp mtbs cam xpres iue 0000 iocon5 0ca5 penh penl polh poll pmod1 pmod0 ovrenh ovrenl ovrdat1 ovrdat0 fltdat1 fltdat0 cldat1 cldat0 swap osync c000 fclcon5 0ca4 ifltmod clsrc4 clsrc3 clsrc2 clsrc1 clsrc0 clpol clmod fltsrc4 fltsrc3 fltsrc2 fltsrc1 fltsr c0 fltpol fltmod1 fltmod0 00f8 pdc5 0ca6 pdc5<15:0> 0000 phase5 0ca8 phase5<15:0> 0000 dtr5 0caa dtr5<13:0> 0000 altdtr5 0cac altdtr5<13:0> 0000 sdc5 0cae sdc5<15:0> 0000 sphase5 0cb0 sphase5<15:0> 0000 trig5 0cb2 trgcmp<15:0> 0000 trgcon5 0cb4 trgdiv3 trgdiv2 trgdiv1 trgdiv0 trgstrt5 trgstrt4 trgstrt3 trgstrt2 trgstrt1 trgstrt0 0000 pwmcap5 0cb8 pwmcap5<15:0> 0000 lebcon5 0cba phr phf plr plf fltleben clleben bch bcl bphh bphl bplh bpll 0000 lebdly5 0cbc leb<11:0> 0000 auxcon5 0cbe blanksel3 blanksel2 blanksel1 blanksel0 chopsel3 chopsel2 chopsel1 chopsel0 chophen choplen 0000 legend: = unimplemented, read as 0 . reset values are shown in hexadecimal. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 60 ? 2013-2014 microchip technology inc. table 4-14: pwm generator 6 register map sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bi t 2 bit 1 bit 0 all resets pwmcon6 0cc0 fltstat clstat trgstat fltien clien trgien itb mdcs dtc1 dtc0 dtcp mtbs cam xpres iue 0000 iocon6 0cc2 penh penl polh poll pmod1 pmod0 ovrenh ovrenl ovrdat1 ovrdat0 fltdat1 fltdat0 cldat1 clda t0 swap osync c000 fclcon6 0cc4 ifltmod clsrc4 clsrc3 clsrc2 clsrc1 clsrc0 clpol clmod fltsrc4 fltsrc3 fltsrc2 fltsrc1 fltsr c0 fltpol fltmod1 fltmod0 00f8 pdc6 0cc6 pdc6<15:0> 0000 phase6 0cc8 phase6<15:0> 0000 dtr6 0cca dtr6<13:0> 0000 altdtr6 0ccc altdtr6<13:0> 0000 sdc6 0cce sdc6<15:0> 0000 sphase6 0cd0 sphase6<15:0> 0000 trig6 0cd2 trgcmp<15:0> 0000 trgcon6 0cd4 trgdiv3 trgdiv2 trgdiv1 trgdiv0 trgstrt5 trgstrt4 trgstrt3 trgstrt2 trgstrt1 trgstrt0 0000 pwmcap6 0cd8 pwmcap6<15:0> 0000 lebcon6 0cda phr phf plr plf fltleben clleben bch bcl bphh bphl bplh bpll 0000 lebdly6 0cdc leb<11:0> 0000 auxcon6 0cde blanksel3 blanksel2 blanksel1 blanksel0 chopsel3 chopsel2 chopsel1 chopsel0 chophen choplen 0000 legend: = unimplemented, read as 0 . reset values are shown in hexadecimal. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 61 dspic33epxxxgm3xx/6xx/7xx table 4-15: qei1 register map sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets qei1con 01c0 qeien qeisidl pimod2 pimod1 pimod0 imv1 imv0 intdiv2 intdiv1 intdiv0 cntpol gaten ccm1 ccm0 0000 qei1ioc 01c2 qcapen fltren qfdiv2 qfdiv1 qfdiv0 outfnc1 outfnc0 swpab hompol idxpo l qebpol qeapol home index qeb qea 000x qei1stat 01c4 pcheqirq pcheqien pcleqirq pcleqien posovirq posovien pciirq pciien velovir q velovien homirq homien idxirq idxien 0000 pos1cntl 01c6 poscnt<15:0> 0000 pos1cnth 01c8 poscnt<31:16> 0000 pos1hld 01ca poshld<15:0> 0000 vel1cnt 01cc velcnt<15:0> 0000 int1tmrl 01ce inttmr<15:0> 0000 int1tmrh 01d0 inttmr<31:16> 0000 int1hldl 01d2 inthld<15:0> 0000 int1hldh 01d4 inthld<31:16> 0000 indx1cntl 01d6 indxcnt<15:0> 0000 indx1cnth 01d8 indxcnt<31:16> 0000 indx1hld 01da indxhld<15:0> 0000 qei1gecl 01dc qeigec<15:0> 0000 qei1icl 01dc qeiic<15:0> 0000 qei1gech 01de qeigec<31:16> 0000 qei1ich 01de qeiic<31:16> 0000 qei1lecl 01e0 qeilec<15:0> 0000 qei1lech 01e2 qeilec<31:16> 0000 legend: x = unknown value on reset; = unimplemented, read as 0 . reset values are shown in hexadecimal. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 62 ? 2013-2014 microchip technology inc. table 4-16: qei2 register map sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets qei2con 05c0 qeien qeisidl pimod2 pimod1 pimod0 imv1 imv0 intdiv2 intdiv1 intdiv0 cntpol gaten ccm1 ccm0 0000 qei2ioc 05c2 qcapen fltren qfdiv2 qfdiv1 qfdiv0 outfnc1 ou tfnc0 swpab hompol idxpol qebpol qeapol home index qeb qea 000x qei2stat 05c4 pcheqirq pcheqien pcleqirq pcleqien posovirq posovien pciirq pciien vel ovirq velovien homirq homien idxirq idxien 0000 pos2cntl 05c6 poscnt<15:0> 0000 pos2cnth 05c8 poscnt<31:16> 0000 pos2hld 05ca poshld<15:0> 0000 vel2cnt 05cc velcnt<15:0> 0000 int2tmrl 05ce inttmr<15:0> 0000 int2tmrh 05d0 inttmr<31:16> 0000 int2hldl 05d2 inthld<15:0> 0000 int2hldh 05d4 inthld<31:16> 0000 indx2cntl 05d6 indxcnt<15:0> 0000 indx2cnth 05d8 indxcnt<31:16> 0000 indx2hld 05da indxhld<15:0> 0000 qei2gecl 05dc qeigec<15:0> 0000 qei2icl 05dc qeiic<15:0> 0000 qei2gech 05de qeigec<31:16> 0000 qei2ich 05de qeiic<31:16> 0000 qei2lecl 05e0 qeilec<15:0> 0000 qei2lech 05e2 qeilec<31:16> 0000 legend: x = unknown value on reset; = unimplemented, read as 0 . reset values are shown in hexadecimal. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 63 dspic33epxxxgm3xx/6xx/7xx table 4-17: i2c1 and i2c2 register map sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bi t 0 all resets i2c1rcv 0200 i2c1 receive register 0000 i2c1trn 0202 i2c1 transmit register 00ff i2c1brg 0204 baud rate generator register 0000 i2c1con 0206 i2cen i2csidl sclrel ipmien a10m disslw smen gcen stren ackdt acken rcen pen rsen sen 1000 i2c1stat 0208 ackstat trstat bcl gcstat add10 iwcol i2cov d_a p s r_w rbf tbf 0000 i2c1add 020a i2c1 address register 0000 i2c1msk 020c i2c1 address mask register 0000 i2c2rcv 0210 i2c2 receive register 0000 i2c2trn 0212 i2c2 transmit register 00ff i2c2brg 0214 baud rate generator register 0000 i2c2con 0216 i2cen i2csidl sclrel ipmien a10m disslw smen gcen stren ackdt acken rcen pen rsen sen 1000 i2c2stat 0218 ackstat trstat bcl gcstat add10 iwcol i2cov d_a p s r_w rbf tbf 0000 i2c2add 021a i2c2 address register 0000 i2c2msk 021c i2c2 address mask register 0000 legend: = unimplemented, read as 0 . reset values are shown in hexadecimal. table 4-18: uart1 and uart2 register map sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets u1mode 0220 uarten usidl iren rtsmd uen1 uen0 wake lpback abaud urxinv brgh pdsel1 pdsel0 stsel 0000 u1sta 0222 utxisel1 utxinv utxisel0 utxbrk utxen utxbf trmt urxisel1 urxisel0 adden ridle perr ferr oerr urxda 0110 u1txreg 0224 uart1 transmit register xxxx u1rxreg 0226 uart1 receive register 0000 u1brg 0228 baud rate generator prescaler 0000 u2mode 0230 uarten usidl iren rtsmd uen1 uen0 wake lpback abaud urxinv brgh pdsel1 pdsel0 stsel 0000 u2sta 0232 utxisel1 utxinv utxisel0 utxbrk utxen utxbf trmt urxisel1 urxisel0 adden ridle perr ferr oerr urxda 0110 u2txreg 0234 uart2 transmit register xxxx u2rxreg 0236 uart2 receive register 0000 u2brg 0238 baud rate generator prescaler 0000 legend: x = unknown value on reset; = unimplemented, read as 0 . reset values are shown in hexadecimal. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 64 ? 2013-2014 microchip technology inc. table 4-20: spi1, spi2 and spi3 register map table 4-19: uart3 and uart4 register map sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets u3mode 0250 uarten usidl iren rtsmd uen1 uen0 wake lpback abaud urxinv brgh pdsel1 pdsel0 stsel 0000 u3sta 0252 utxisel1 utxinv utxisel0 utxbrk utxen utxbf trmt urxisel1 urxisel0 adden ridle perr ferr oerr urxda 0110 u3txreg 0254 uart3 transmit register xxxx u3rxreg 0256 uart3 receive register 0000 u3brg 0258 baud rate generator prescaler 0000 u4mode 02b0 uarten usidl iren rtsmd uen1 uen0 wake lpback abaud urxinv brgh pdsel1 pdsel0 stsel 0000 u4sta 02b2 utxisel1 utxinv utxisel0 utxbrk utxen utxbf trmt urxisel1 urxisel0 adden ridle perr ferr oerr urxda 0110 u4txreg 02b4 uart4 transmit register xxxx u4rxreg 02b6 uart4 receive register 0000 u4brg 02b8 baud rate generator prescaler 0000 legend: x = unknown value on reset; = unimplemented, read as 0 . reset values are shown in hexadecimal. sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets spi1stat 0240 spien spisidl spibec2 spibec1 spibec0 srmpt spirov srxmpt sisel2 sisel1 sisel0 spitbf spirbf 0000 spi1con1 0242 dissck dissdo mode16 smp cke ssen ckp msten spre2 spre1 spre0 ppre1 ppre0 0000 spi1con2 0244 frmen spifsd frmpol frmdly spiben 0000 spi1buf 0248 spi1 transmit and receive buffer register 0000 spi2stat 0260 spien spisidl spibec2 spibec1 spibec0 srmpt spirov srxmpt sisel2 sisel1 sisel0 spitbf spirbf 0000 spi2con1 0262 dissck dissdo mode16 smp cke ssen ckp msten spre2 spre1 spre0 ppre1 ppre0 0000 spi2con2 0264 frmen spifsd frmpol frmdly spiben 0000 spi2buf 0268 spi2 transmit and receive buffer register 0000 spi3stat 02a0 spien spisidl spibec2 spibec1 spibec0 srmpt spirov srxmpt sisel2 sisel1 sisel0 spitbf spirbf 0000 spi3con1 02a2 dissck dissdo mode16 smp cke ssen ckp msten spre2 spre1 spre0 ppre1 ppre0 0000 spi3con2 02a4 frmen spifsd frmpol frmdly spiben 0000 spi3buf 02a8 spi3 transmit and receive buffer register 0000 legend: = unimplemented, read as 0 . reset values are shown in hexadecimal. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 65 dspic33epxxxgm3xx/6xx/7xx table 4-21: dci register map sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets dcicon1 0280 dcien r dcisidl r dloop csckd cscke cofsd unfm csdom djst r r r cofsm1 cofsm0 0000 dcicon2 0282 r r r rb l e n 1b l e n 0 r cofsg3 cofsg2 cofsg1 cofsg0 r ws3 ws2 ws1 ws0 0000 dcicon3 0284 r r r rb c g < 1 1 : 0 > 0000 dcistat 0286 r r r r slot3 slot2 slot1 slot0 r r r r rov rful tunf tmpty 0000 tscon 0288 tse<15:0> 0000 rscon 028c rse<15:0> 0000 rxbuf0 0290 receive 0 data register uuuu rxbuf1 0292 receive 1 data register uuuu rxbuf2 0294 receive 2 data register uuuu rxbuf3 0296 receive 3 data register uuuu txbuf0 0298 transmit 0 data register 0000 txbuf1 029a transmit 1 data register 0000 txbuf2 029c transmit 2 data register 0000 txbuf3 029e transmit 3 data register 0000 legend: u = unchanged; r = reserved; = unimplemented, read as 0 . reset values are shown in hexadecimal. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 66 ? 2013-2014 microchip technology inc. table 4-22: adc1 and adc2 register map sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets adc1buf0 0300 adc1 data buffer 0 xxxx adc1buf1 0302 adc1 data buffer 1 xxxx adc1buf2 0304 adc1 data buffer 2 xxxx adc1buf3 0306 adc1 data buffer 3 xxxx adc1buf4 0308 adc1 data buffer 4 xxxx adc1buf5 030a adc1 data buffer 5 xxxx adc1buf6 030c adc1 data buffer 6 xxxx adc1buf7 030e adc1 data buffer 7 xxxx adc1buf8 0310 adc1 data buffer 8 xxxx adc1buf9 0312 adc1 data buffer 9 xxxx adc1bufa 0314 adc1 data buffer 10 xxxx adc1bufb 0316 adc1 data buffer 11 xxxx adc1bufc 0318 adc1 data buffer 12 xxxx adc1bufd 031a adc1 data buffer 13 xxxx adc1bufe 031c adc1 data buffer 14 xxxx adc1buff 031e adc1 data buffer 15 xxxx ad1con1 0320 adon adsidl addmabm ad12b form1 form0 ssrc2 ssrc1 ssrc0 ssrcg simsam asam samp done 0000 ad1con2 0322 vcfg2 vcfg1 vcfg0 offcal cscna chps1 chps0 bufs smpi4 smpi3 smpi2 smpi1 smpi0 bufm alts 0000 ad1con3 0324 adrc samc4 samc3 samc2 samc1 samc0 adcs7 adcs6 adcs5 adcs4 adcs3 adcs2 adcs1 adcs0 0000 ad1chs123 0326 ch123sb2 ch123sb1 ch123nb1 ch123nb0 ch123sb0 ch123sa2 ch123sa1 ch123na1 ch123na0 ch123sa0 0000 ad1chs0 0328 ch0nb ch0sb5 ch0sb4 ch0sb3 ch0sb2 ch0sb1 ch0sb0 ch0na ch0sa5 ch0sa4 ch0sa3 ch0sa2 ch0sa1 ch0sa0 0000 ad1cssh 032e css<31:16> 0000 ad1cssl 0330 css<15:0> 0000 ad1con4 0332 addmaen dmabl2 dmabl1 dmabl0 0000 adc2buf0 0340 adc2 data buffer 0 xxxx adc2buf1 0342 adc2 data buffer 1 xxxx adc2buf2 0344 adc2 data buffer 2 xxxx adc2buf3 0346 adc2 data buffer 3 xxxx adc2buf4 0348 adc2 data buffer 4 xxxx adc2buf5 034a adc2 data buffer 5 xxxx adc2buf6 034c adc2 data buffer 6 xxxx adc2buf7 034e adc2 data buffer 7 xxxx adc2buf8 0350 adc2 data buffer 8 xxxx legend: x = unknown value on reset; = unimplemented, read as 0 . reset values are shown in hexadecimal. note 1: bits 13 and bit 5 are reserved in the ad2chs0 register, unlike the ad1c hs0 register. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 67 dspic33epxxxgm3xx/6xx/7xx adc2buf9 0352 adc2 data buffer 9 xxxx adc2bufa 0354 adc2 data buffer 10 xxxx adc2bufb 0356 adc2 data buffer 11 xxxx adc2bufc 0358 adc2 data buffer 12 xxxx adc2bufd 035a adc2 data buffer 13 xxxx adc2bufe 035c adc2 data buffer 14 xxxx adc2buff 035e adc2 data buffer 15 xxxx ad2con1 0360 adon adsidl addmabm ad12b form1 form0 ssrc2 ssrc1 ssrc0 ssrcg simsam asam samp done 0000 ad2con2 0362 vcfg2 vcfg1 vcfg0 offcal cscna chps1 chps0 bufs smpi4 smpi3 smpi2 smpi1 smpi0 bufm alts 0000 ad2con3 0364 adrc samc4 samc3 samc2 samc1 samc0 adcs7 adcs6 adcs5 adcs4 adcs3 adcs2 adcs1 adcs0 0000 ad2chs123 0366 ch123sb2 ch123sb1 ch123nb1 ch123nb0 ch123sb0 ch123sa2 ch123sa1 ch123na1 ch123na0 ch123sa0 0000 ad2chs0 0368 ch0nb ch0sb5 ( 1 ) ch0sb4 ch0sb3 ch0sb2 ch0sb1 ch0sb0 ch0na ch0sa5 ( 1 ) ch0sa4 ch0sa3 ch0sa2 ch0sa1 ch0sa0 0000 ad2cssh 036e css<31:16> 0000 ad2cssl 0370 css<15:0> 0000 ad2con4 0372 addmaen dmabl2 dmabl1 dmabl0 0000 table 4-22: adc1 and adc2 register map (continued) sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets legend: x = unknown value on reset; = unimplemented, read as 0 . reset values are shown in hexadecimal. note 1: bits 13 and bit 5 are reserved in the ad2chs0 register, unlike the ad1c hs0 register. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 68 ? 2013-2014 microchip technology inc. table 4-23: can1 register map when win (c1ctrl<0>) = 0 or 1 for dspic33epxxxgm60x/7xx devices ( 1 ) sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets c1ctrl1 0400 csidl abat cancks reqop2 reqop1 reqop0 opmode2 opmode1 opmode0 c a n c a p w i n 0480 c1ctrl2 0402 dncnt<4:0> 0000 c1vec 0404 filhit4 filhit3 filhit2 filhit1 filhit0 icode6 icode5 icode4 icode3 icode2 icode1 icode0 0040 c1fctrl 0406 dmabs2 dmabs1 dmabs0 fsa4 fsa3 fsa2 fsa1 fsa0 0000 c1fifo 0408 fbp5 fbp4 fbp3 fbp2 fbp1 fbp0 fnrb5 fnrb4 fnrb3 fnrb2 fnrb1 fnrb0 0000 c1intf 040a txbo txbp rxbp txwar rxwar ewarn ivrif wakif errif fifoif rbovif rbif tbif 0000 c1inte 040c ivrie wakie errie fifoie rbovie rbie tbie 0000 c1ec 040e terrcnt7 terrcnt6 terrcnt5 terrcnt4 terrcnt3 terrcnt2 terrcnt1 terrcnt0 rerrcnt7 r errcnt6 rerrcnt5 rerrcnt4 rerrcnt3 rerrcnt2 rerrcnt 1rerrcnt0 0000 c1cfg1 0410 sjw1 sjw0 brp5 brp4 brp3 brp2 brp1 brp0 0000 c1cfg2 0412 w a k f i l seg2ph2 seg2ph1 seg2ph0 seg2phts sam seg1ph2 seg1ph1 seg1ph0 prseg2 prseg1 prseg0 0000 c1fen1 0414 flten<15:0> ffff c1fmsksel1 0418 f7msk1 f7msk0 f6msk1 f6msk0 f5msk1 f5msk0 f4msk1 f4 msk0 f3msk1 f3msk0 f2msk1 f2msk0 f1msk1 f1msk0 f0msk1 f0msk0 0000 c1fmsksel2 041a f15msk1 f15msk0 f14msk1 f14msk0 f13msk1 f13msk0 f12msk1 f12msk0 f11msk1 f1 1msk0 f10msk1 f10msk0 f9msk1 f9msk0 f8msk1 f8msk0 0000 legend: = unimplemented, read as 0 . reset values are shown in hexadecimal. note 1: these registers are not present on dspic33epxxxgm3xx devices. table 4-24: can1 register map when win (c1ctrl<0>) = 0 for dspic33epxxxgm60x/7xx devices ( 1 ) sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets 0400- 041e see definition when win = x c1rxful1 0420 rxful<15:0> 0000 c1rxful2 0422 rxful<31:16> 0000 c1rxovf1 0428 rxovf<15:0> 0000 c1rxovf2 042a rxovf<31:16> 0000 c1tr01con 0430 txen1 txabt1 txlarb1 txerr1 txreq1 rtren1 tx1pri1 tx1pri0 txen0 txabat0 txlarb0 txerr0 txreq0 rtren0 tx0pri1 tx0pri0 0000 c1tr23con 0432 txen3 txabt3 txlarb3 txerr3 txreq3 rtren3 tx3pri1 tx3pri0 txen2 txabat2 txlarb2 txerr2 txreq2 rtren2 tx2pri1 tx2pri0 0000 c1tr45con 0434 txen5 txabt5 txlarb5 txerr5 txreq5 rtren5 tx5pri1 tx5pri0 txen4 txabat4 txlarb4 txerr4 txreq4 rtren4 tx4pri1 tx4pri0 0000 c1tr67con 0436 txen7 txabt7 txlarb7 txerr7 txreq7 rtren7 tx7pri1 tx7pri0 txen6 txabat6 txlarb6 txerr6 txreq6 rtren6 tx6pri1 tx6pri0 xxxx c1rxd 0440 can1 receive data word xxxx c1txd 0442 can1 transmit data word xxxx legend: x = unknown value on reset; = unimplemented, read as 0 . reset values are shown in hexadecimal. note 1: these registers are not present on dspic33epxxxgm3xx devices. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 69 dspic33epxxxgm3xx/6xx/7xx table 4-25: can1 register map when win (c1ctrl<0>) = 1 for dspic33epxxxgm60x/7xx devices ( 1 ) sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets 0400- 041e see definition when win = x c1bufpnt1 0420 f3bp3 f3bp2 f3bp1 f3bp0 f2bp3 f2bp2 f2bp1 f2bp0 f1bp3 f1bp2 f1bp1 f1bp0 f0bp3 f0bp2 f0bp1 f0bp0 0000 c1bufpnt2 0422 f7bp3 f7bp2 f7bp1 f7bp0 f6bp3 f6bp2 f6bp1 f6bp0 f5bp3 f5bp2 f5bp1 f5bp0 f4bp3 f4bp2 f4bp1 f4bp0 0000 c1bufpnt3 0424 f11bp3 f11bp2 f11bp1 f11bp0 f10bp3 f10bp2 f10bp1 f10bp0 f9bp3 f9bp2 f9bp1 f9bp0 f8bp3 f8bp2 f8bp1 f8 bp0 0000 c1bufpnt4 0426 f15bp3 f15bp2 f15bp1 f15bp0 f14bp3 f14bp2 f14bp1 f14bp0 f13bp3 f13bp2 f13 bp1 f13bp0 f12bp3 f12bp2 f12bp1 f12bp0 0000 c1rxm0sid 0430 sid10 sid9 sid8 sid7 sid6 sid5 sid4 sid3 sid2 sid1 sid0 m i d e e i d 1 7e i d 1 6 xxxx c1rxm0eid 0432 eid<15:0> xxxx c1rxm1sid 0434 sid10 sid9 sid8 sid7 sid6 sid5 sid4 sid3 sid2 sid1 sid0 m i d e e i d 1 7e i d 1 6 xxxx c1rxm1eid 0436 eid<15:0> xxxx c1rxm2sid 0438 sid10 sid9 sid8 sid7 sid6 sid5 sid4 sid3 sid2 sid1 sid0 m i d e e i d 1 7e i d 1 6 xxxx c1rxm2eid 043a eid<15:0> xxxx c1rxf0sid 0440 sid10 sid9 sid8 sid7 sid6 sid5 sid4 sid3 sid2 sid1 sid0 exide e i d 1 7e i d 1 6 xxxx c1rxf0eid 0442 eid<15:0> xxxx c1rxf1sid 0444 sid10 sid9 sid8 sid7 sid6 sid5 sid4 sid3 sid2 sid1 sid0 exide e i d 1 7e i d 1 6 xxxx c1rxf1eid 0446 eid<15:0> xxxx c1rxf2sid 0448 sid10 sid9 sid8 sid7 sid6 sid5 sid4 sid3 sid2 sid1 sid0 exide e i d 1 7e i d 1 6 xxxx c1rxf2eid 044a eid<15:0> xxxx c1rxf3sid 044c sid10 sid9 sid8 sid7 sid6 sid5 sid4 sid3 sid2 sid1 sid0 exide e i d 1 7e i d 1 6 xxxx c1rxf3eid 044e eid<15:0> xxxx c1rxf4sid 0450 sid10 sid9 sid8 sid7 sid6 sid5 sid4 sid3 sid2 sid1 sid0 exide e i d 1 7e i d 1 6 xxxx c1rxf4eid 0452 eid<15:0> xxxx c1rxf5sid 0454 sid10 sid9 sid8 sid7 sid6 sid5 sid4 sid3 sid2 sid1 sid0 exide e i d 1 7e i d 1 6 xxxx c1rxf5eid 0456 eid<15:0> xxxx c1rxf6sid 0458 sid10 sid9 sid8 sid7 sid6 sid5 sid4 sid3 sid2 sid1 sid0 exide e i d 1 7e i d 1 6 xxxx c1rxf6eid 045a eid<15:0> xxxx c1rxf7sid 045c sid10 sid9 sid8 sid7 sid6 sid5 sid4 sid3 sid2 sid1 sid0 exide e i d 1 7e i d 1 6 xxxx c1rxf7eid 045e eid<15:0> xxxx c1rxf8sid 0460 sid10 sid9 sid8 sid7 sid6 sid5 sid4 sid3 sid2 sid1 sid0 exide e i d 1 7e i d 1 6 xxxx c1rxf8eid 0462 eid<15:0> xxxx c1rxf9sid 0464 sid10 sid9 sid8 sid7 sid6 sid5 sid4 sid3 sid2 sid1 sid0 exide e i d 1 7e i d 1 6 xxxx c1rxf9eid 0466 eid<15:0> xxxx c1rxf10sid 0468 sid10 sid9 sid8 sid7 sid6 sid5 sid4 sid3 sid2 sid1 sid0 exide e i d 1 7e i d 1 6 xxxx c1rxf10eid 046a eid<15:0> xxxx legend: x = unknown value on reset; = unimplemented, read as 0 . reset values are shown in hexadecimal. note 1: these registers are not present on dspic33epxxxgm3xx devices. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 70 ? 2013-2014 microchip technology inc. c1rxf11sid 046c sid10 sid9 sid8 sid7 sid6 sid5 sid4 sid3 sid2 sid1 sid0 exide e i d 1 7e i d 1 6 xxxx c1rxf11eid 046e eid<15:0> xxxx c1rxf12sid 0470 sid10 sid9 sid8 sid7 sid6 sid5 sid4 sid3 sid2 sid1 sid0 exide e i d 1 7e i d 1 6 xxxx c1rxf12eid 0472 eid<15:0> xxxx c1rxf13sid 0474 sid10 sid9 sid8 sid7 sid6 sid5 sid4 sid3 sid2 sid1 sid0 exide e i d 1 7e i d 1 6 xxxx c1rxf13eid 0476 eid<15:0> xxxx c1rxf14sid 0478 sid10 sid9 sid8 sid7 sid6 sid5 sid4 sid3 sid2 sid1 sid0 exide e i d 1 7e i d 1 6 xxxx c1rxf14eid 047a eid<15:0> xxxx c1rxf15sid 047c sid10 sid9 sid8 sid 7 sid6 sid5 sid4 sid3 sid2 sid1 sid0 exide e i d 1 7e i d 1 6 xxxx c1rxf15eid 047e eid<15:0> xxxx table 4-25: can1 register map when win (c1ctrl<0>) = 1 for dspic33epxxxgm60x/7xx devices ( 1 ) (continued) sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets legend: x = unknown value on reset; = unimplemented, read as 0 . reset values are shown in hexadecimal. note 1: these registers are not present on dspic33epxxxgm3xx devices. table 4-26: can2 register map when win (c1ctrl<0>) = 0 or 1 for dspic33epxxxgm60x/7xx devices ( 1 ) sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 b it 4 bit 3 bit 2 bit 1 bit 0 all resets c2ctrl1 0500 csidl abat cancks reqop2 reqop1 reqop0 opmode2 opmode1 opmode0 c a n c a p w i n 0480 c2ctrl2 0502 dncnt<4:0> 0000 c2vec 0504 filhit4 filhit3 filhit2 filhit1 filhit0 icode6 icode5 icode4 icode3 icode2 icode1 icode0 0040 c2fctrl 0506 dmabs2 dmabs1 dmabs0 fsa4 fsa3 fsa2 fsa1 fsa0 0000 c2fifo 0508 fbp5 fbp4 fbp3 fbp2 fbp1 fbp0 fnrb5 fnrb4 fnrb3 fnrb2 fnrb1 fnrb0 0000 c2intf 050a txbo txbp rxbp txwar rxwar ewarn ivrif wakif errif fifoif rbovif rbif tbif 0000 c2inte 050c ivrie wakie errie fifoie rbovie rbie tbie 0000 c2ec 050e terrcnt7 terrcnt6 terrcnt5 terrcnt4 terrcnt3 terrcnt2 terrcnt1 terrcnt0 rerrcnt7 rerrcnt6 rerrcnt5 rerrcnt4 rerrcnt3 rerrcnt2 rerrcnt 1 rerrcnt0 0000 c2cfg1 0510 sjw1 sjw0 brp5 brp4 brp3 brp2 brp1 brp0 0000 c2cfg2 0512 wakfil seg2ph2 seg2ph1 seg2ph0 seg2phts sam seg1ph2 seg1ph1 seg1ph0 prseg2 prseg1 prseg0 0000 c2fen1 0514 flten<15:0> ffff c2fmsksel1 0518 f7msk1 f7msk0 f6msk1 f6msk0 f5msk1 f5msk0 f4msk1 f4 msk0 f3msk1 f3msk0 f2msk1 f2msk0 f1msk1 f1msk0 f0msk1 f0msk0 0000 c2fmsksel2 051a f15msk1 f15msk0 f14msk1 f14msk0 f13msk1 f13msk0 f12msk1 f12msk0 f11msk1 f11msk0 f10msk1 f 10msk0 f9msk1 f9msk0 f8msk1 f8msk0 0000 legend: = unimplemented, read as 0 . reset values are shown in hexadecimal. note 1: these registers are not present on dspic33epxxxgm3xx devices. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 71 dspic33epxxxgm3xx/6xx/7xx table 4-27: can2 register map when win (c1ctrl<0>) = 0 for dspic33epxxxgm60x/7xx devices ( 1 ) sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets 0500- 051e see definition when win = x c2rxful1 0520 rxful<15:0> 0000 c2rxful2 0522 rxful<31:16> 0000 c2rxovf1 0528 rxovf<15:0> 0000 c2rxovf2 052a rxovf<31:16> 0000 c2tr01con 0530 txen1 txabt1 txlarb1 txerr1 txreq1 rtren1 tx1pri1 tx1pri0 txen0 tx abat0 txlarb0 txerr0 txreq0 rtren0 tx0pri1 tx0pri0 0000 c2tr23con 0532 txen3 txabt3 txlarb3 txerr3 txreq3 rtren3 tx3pri1 tx3pri0 txen2 tx abat2 txlarb2 txerr2 txreq2 rtren2 tx2pri1 tx2pri0 0000 c2tr45con 0534 txen5 txabt5 txlarb5 txerr5 txreq5 rtren5 tx5pri1 tx5pri0 txen4 tx abat4 txlarb4 txerr4 txreq4 rtren4 tx4pri1 tx4pri0 0000 c2tr67con 0536 txen7 txabt7 txlarb7 txerr7 txreq7 rtren7 tx7pri1 tx7pri0 txen6 tx abat6 txlarb6 txerr6 txreq6 rtren6 tx6pri1 tx6pri0 xxxx c2rxd 0540 can2 receive data word register xxxx c2txd 0542 can2 transmit data word register xxxx legend: x = unknown value on reset; = unimplemented, read as 0 . reset values are shown in hexadecimal. note 1: these registers are not present on dspic33epxxxgm3xx devices. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 72 ? 2013-2014 microchip technology inc. table 4-28: can2 register map when win (c1ctrl<0>) = 1 for dspic33epxxxgm60x/7xx devices ( 1 ) sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets 0500- 051e see definition when win = x c2bufpnt1 0520 f3bp3 f3bp2 f3bp1 f3bp0 f2bp3 f2bp2 f2bp1 f2bp0 f1bp3 f1bp2 f1bp1 f1bp0 f0bp3 f0bp2 f0bp1 f0bp0 0000 c2bufpnt2 0522 f7bp3 f7bp2 f7bp1 f7bp0 f6bp3 f6bp2 f6bp1 f6bp0 f5bp3 f5bp2 f5bp1 f5bp0 f4bp3 f4bp2 f4bp1 f4bp0 0000 c2bufpnt3 0524 f11bp3 f11bp2 f11bp1 f11bp0 f10bp3 f10bp2 f10bp1 f10bp0 f9bp3 f9bp2 f9bp1 f9bp0 f8bp3 f8bp2 f8bp1 f8bp 0 0000 c2bufpnt4 0526 f15bp3 f15bp2 f15bp1 f15bp0 f14bp3 f14bp2 f14bp1 f14bp0 f13bp3 f13bp2 f13bp1 f13bp0 f12bp3 f12bp2 f12bp1 f12bp0 0000 c2rxm0sid 0530 sid10 sid9 sid8 sid7 sid6 sid5 sid4 sid3 sid2 sid1 sid0 m i d e e i d 1 7e i d 1 6 xxxx c2rxm0eid 0532 eid<15:0> xxxx c2rxm1sid 0534 sid10 sid9 sid8 sid7 sid6 sid5 sid4 sid3 sid2 sid1 sid0 m i d e e i d 1 7e i d 1 6 xxxx c2rxm1eid 0536 eid<15:0> xxxx c2rxm2sid 0538 sid10 sid9 sid8 sid7 sid6 sid5 sid4 sid3 sid2 sid1 sid0 m i d e e i d 1 7e i d 1 6 xxxx c2rxm2eid 053a eid<15:0> xxxx c2rxf0sid 0540 sid10 sid9 sid8 sid7 sid6 sid5 sid4 sid3 sid2 sid1 sid0 m i d e e i d 1 7e i d 1 6 xxxx c2rxf0eid 0542 eid<15:0> xxxx c2rxf1sid 0544 sid10 sid9 sid8 sid7 sid6 sid5 sid4 sid3 sid2 sid1 sid0 m i d e e i d 1 7e i d 1 6 xxxx c2rxf1eid 0546 eid<15:0> xxxx c2rxf2sid 0548 sid10 sid9 sid8 sid7 sid6 sid5 sid4 sid3 sid2 sid1 sid0 m i d e e i d 1 7e i d 1 6 xxxx c2rxf2eid 054a eid<15:0> xxxx c2rxf3sid 054c sid10 sid9 sid8 sid7 sid6 sid5 sid4 sid3 sid2 sid1 sid0 m i d e e i d 1 7e i d 1 6 xxxx c2rxf3eid 054e eid<15:0> xxxx c2rxf4sid 0550 sid10 sid9 sid8 sid7 sid6 sid5 sid4 sid3 sid2 sid1 sid0 m i d e e i d 1 7e i d 1 6 xxxx c2rxf4eid 0552 eid<15:0> xxxx c2rxf5sid 0554 sid10 sid9 sid8 sid7 sid6 sid5 sid4 sid3 sid2 sid1 sid0 m i d e e i d 1 7e i d 1 6 xxxx c2rxf5eid 0556 eid<15:0> xxxx c2rxf6sid 0558 sid10 sid9 sid8 sid7 sid6 sid5 sid4 sid3 sid2 sid1 sid0 m i d e e i d 1 7e i d 1 6 xxxx c2rxf6eid 055a eid<15:0> xxxx c2rxf7sid 055c sid10 sid9 sid8 sid7 sid6 sid5 sid4 sid3 sid2 sid1 sid0 m i d e e i d 1 7e i d 1 6 xxxx c2rxf7eid 055e eid<15:0> xxxx c2rxf8sid 0560 sid10 sid9 sid8 sid7 sid6 sid5 sid4 sid3 sid2 sid1 sid0 m i d e e i d 1 7e i d 1 6 xxxx c2rxf8eid 0562 eid<15:0> xxxx c2rxf9sid 0564 sid10 sid9 sid8 sid7 sid6 sid5 sid4 sid3 sid2 sid1 sid0 m i d e e i d 1 7e i d 1 6 xxxx c2rxf9eid 0566 eid<15:0> xxxx c2rxf10sid 0568 sid10 sid9 sid8 sid7 sid6 sid5 sid4 sid3 sid2 sid1 sid0 m i d e e i d 1 7e i d 1 6 xxxx c2rxf10eid 056a eid<15:0> xxxx legend: x = unknown value on reset; = unimplemented, read as 0 . reset values are shown in hexadecimal. note 1: these registers are not present on dspic33epxxxgm3xx devices. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 73 dspic33epxxxgm3xx/6xx/7xx table 4-29: programmable crc register map c2rxf11sid 056c sid10 sid9 sid8 sid7 sid6 sid5 sid4 sid3 sid2 sid1 sid0 exide e i d 1 7e i d 1 6 xxxx c2rxf11eid 056e eid<15:0> xxxx c2rxf12sid 0570 sid10 sid9 sid8 sid7 sid6 sid5 sid4 sid3 sid2 sid1 sid0 m i d e e i d 1 7e i d 1 6 xxxx c2rxf12eid 0572 eid<15:0> xxxx c2rxf13sid 0574 sid10 sid9 sid8 sid7 sid6 sid5 sid4 sid3 sid2 sid1 sid0 m i d e e i d 1 7e i d 1 6 xxxx c2rxf13eid 0576 eid<15:0> xxxx c2rxf14sid 0578 sid10 sid9 sid8 sid7 sid6 sid5 sid4 sid3 sid2 sid1 sid0 m i d e e i d 1 7e i d 1 6 xxxx c2rxf14eid 057a eid<15:0> xxxx c2rxf15sid 057c sid10 sid9 sid8 sid7 sid6 sid5 sid4 sid3 sid2 sid1 sid0 m i d e e i d 1 7e i d 1 6 xxxx c2rxf15eid 057e eid<15:0> xxxx sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets crccon1 0640 crcen csidl vword4 vword3 vword2 vword1 vword0 crcful crcmpt crcisel crcgo lendian 0000 crccon2 0642 dwidth4 dwidth3 dwidth2 dwidth1 dwidth0 plen4 plen3 plen2 plen1 plen0 0000 crcxorl 0644 x<15:1> 0000 crcxorh 0646 x<31:16> 0000 crcdatl 0648 crc data input low word register 0000 crcdath 064a crc data input high word register 0000 crcwdatl 064c crc result low word register 0000 crcwdath 064e crc result high word register 0000 legend: = unimplemented, read as 0 . shaded bits are not used in the operation of the programmable crc modu le. table 4-28: can2 register map when win (c1ctrl<0>) = 1 for dspic33epxxxgm60x/7xx devices ( 1 ) (continued) sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets legend: x = unknown value on reset; = unimplemented, read as 0 . reset values are shown in hexadecimal. note 1: these registers are not present on dspic33epxxxgm3xx devices. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 74 ? 2013-2014 microchip technology inc. table 4-30: peripheral pin select output regi ster map for dspic33epxxxgm304/604 devices table 4-31: peripheral pin select output regi ster map for dspic33epxxxgm306/706 devices sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets rpor0 0680 r p 3 5 r < 5 : 0 > r p 2 0 r < 5 : 0 > 0000 rpor1 0682 r p 3 7 r < 5 : 0 > r p 3 6 r < 5 : 0 > 0000 rpor2 0684 r p 3 9 r < 5 : 0 > r p 3 8 r < 5 : 0 > 0000 rpor3 0686 r p 4 1 r < 5 : 0 > r p 4 0 r < 5 : 0 > 0000 rpor4 0688 r p 4 3 r < 5 : 0 > r p 4 2 r < 5 : 0 > 0000 rpor5 068a r p 4 9 r < 5 : 0 > r p 4 8 r < 5 : 0 > 0000 rpor6 068c r p 5 5 r < 5 : 0 > r p 5 4 r < 5 : 0 > 0000 rpor7 068e r p 5 7 r < 5 : 0 > r p 5 6 r < 5 : 0 > 0000 legend: = unimplemented, read as 0 . reset values are shown in hexadecimal. sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets rpor0 0680 r p 3 5 r < 5 : 0 > r p 2 0 r < 5 : 0 > 0000 rpor1 0682 r p 3 7 r < 5 : 0 > r p 3 6 r < 5 : 0 > 0000 rpor2 0684 r p 3 9 r < 5 : 0 > r p 3 8 r < 5 : 0 > 0000 rpor3 0686 r p 4 1 r < 5 : 0 > r p 4 0 r < 5 : 0 > 0000 rpor4 0688 r p 4 3 r < 5 : 0 > r p 4 2 r < 5 : 0 > 0000 rpor5 068a r p 4 9 r < 5 : 0 > r p 4 8 r < 5 : 0 > 0000 rpor6 068c r p 5 5 r < 5 : 0 > r p 5 4 r < 5 : 0 > 0000 rpor7 068e r p 5 7 r < 5 : 0 > r p 5 6 r < 5 : 0 > 0000 rpor8 0690 r p 7 0 r < 5 : 0 > r p 6 9 r < 5 : 0 > 0000 rpor9 0692 r p 9 7 r < 5 : 0 > 0000 legend: = unimplemented, read as 0 . reset values are shown in hexadecimal. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 75 dspic33epxxxgm3xx/6xx/7xx table 4-32: peripheral pin select output regi ster map for dspic33epxxxgm310/710 devices sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets rpor0 0680 r p 3 5 r < 5 : 0 > r p 2 0 r < 5 : 0 > 0000 rpor1 0682 r p 3 7 r < 5 : 0 > r p 3 6 r < 5 : 0 > 0000 rpor2 0684 r p 3 9 r < 5 : 0 > r p 3 8 r < 5 : 0 > 0000 rpor3 0686 r p 4 1 r < 5 : 0 > r p 4 0 r < 5 : 0 > 0000 rpor4 0688 r p 4 3 r < 5 : 0 > r p 4 2 r < 5 : 0 > 0000 rpor5 068a r p 4 9 r < 5 : 0 > r p 4 8 r < 5 : 0 > 0000 rpor6 068c r p 5 5 r < 5 : 0 > r p 5 4 r < 5 : 0 > 0000 rpor7 068e r p 5 7 r < 5 : 0 > r p 5 6 r < 5 : 0 > 0000 rpor8 0690 r p 7 0 r < 5 : 0 > r p 6 9 r < 5 : 0 > 0000 rpor9 0692 r p 9 7 r < 5 : 0 > r p 8 1 r < 5 : 0 > 0000 rpor10 0694 rp118r<5:0> rp113r<5:0> 0000 rpor11 0696 rpr125r<5:0> rpr120r<5:0> 0000 rpor12 0698 rpr127r<5:0> rpr126r<5:0> 0000 legend: = unimplemented, read as 0 . reset values are shown in hexadecimal. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 76 ? 2013-2014 microchip technology inc. table 4-33: peripheral pin select input register map for dspic33epxxxgm60x/7xx devices sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets rpinr0 06a0 i n t 1 r < 6 : 0 > 0000 rpinr1 06a2 i n t 2 r < 6 : 0 > 0000 rpinr3 06a6 t 2 c k r < 6 : 0 > 0000 rpinr7 06ae ic2r<6:0> ic1r<6:0> 0000 rpinr8 06b0 ic4r<6:0> ic3r<6:0> 0000 rpinr9 06b2 ic6r<6:0> ic5r<6:0> 0000 rpinr10 06b4 ic8r<6:0> ic7r<6:0> 0000 rpinr11 06b6 o c f a r < 6 : 0 > 0000 rpinr12 06b8 f l t 2 r < 6 : 0 > f l t 1 r < 6 : 0 > 0000 rpinr14 06bc qeb1r<6:0> q e a 1 r < 6 : 0 > 0000 rpinr15 06be h o m e 1 r < 6 : 0 > indx1r<6:0> 0000 rpinr16 06c0 qeb2r<6:0> q e a 2 r < 6 : 0 > 0000 rpinr17 06c2 h o m e 2 r < 6 : 0 > indx2r<6:0> 0000 rpinr18 06c4 u 1 r x r < 6 : 0 > 0000 rpinr19 06c6 u 2 r x r < 6 : 0 > 0000 rpinr22 06cc s c k 2 r < 6 : 0 > s d i 2 r < 6 : 0 > 0000 rpinr23 06ce ss2r<6:0> 0000 rpinr24 06d0 csckr<6:0> c s d i r < 6 : 0 > 0000 rpinr25 06d2 cofsr<6:0> 0000 rpinr26 06d4 c 2 r x r < 6 : 0 > c 1 r x r < 6 : 0 > 0000 rpinr27 06d6 u3ctsr<6:0> u 3 r x r < 6 : 0 > 0000 rpinr28 06d8 u4ctsr<6:0> u 4 r x r < 6 : 0 > 0000 rpinr29 06da s c k 3 r < 6 : 0 > s d i 3 r < 6 : 0 > 0000 rpinr30 06dc ss3r<6:0> 0000 rpinr37 06ea synci1r<6:0> 0000 rpinr38 06ec d t c m p 1 r < 6 : 0 > 0000 rpinr39 06ee d t c m p 3 r < 6 : 0 > d t c m p 2 r < 6 : 0 > 0000 rpinr40 06f0 d t c m p 5 r < 6 : 0 > d t c m p 4 r < 6 : 0 > 0000 rpinr41 06f2 d t c m p 6 r < 6 : 0 > 0000 legend: = unimplemented, read as 0 . reset values are shown in hexadecimal. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 77 dspic33epxxxgm3xx/6xx/7xx table 4-34: peripheral pin select input register map for dspic33epxxxgm3xx devices sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets rpinr0 06a0 i n t 1 r < 6 : 0 > 0000 rpinr1 06a2 i n t 2 r < 6 : 0 > 0000 rpinr3 06a6 t 2 c k r < 6 : 0 > 0000 rpinr7 06ae ic2r<6:0> ic1r<6:0> 0000 rpinr8 06b0 ic4r<6:0> ic3r<6:0> 0000 rpinr9 06b2 ic6r<6:0> ic5r<6:0> 0000 rpinr10 06b4 ic8r<6:0> ic7r<6:0> 0000 rpinr11 06b6 o c f a r < 6 : 0 > 0000 rpinr12 06b8 f l t 2 r < 6 : 0 > f l t 1 r < 6 : 0 > 0000 rpinr14 06bc qeb1r<6:0> q e a 1 r < 6 : 0 > 0000 rpinr15 06be h o m e 1 r < 6 : 0 > indx1r<6:0> 0000 rpinr16 06c0 qeb2r<6:0> q e a 2 r < 6 : 0 > 0000 rpinr17 06c2 h o m e 2 r < 6 : 0 > indx2r<6:0> 0000 rpinr18 06c4 u 1 r x r < 6 : 0 > 0000 rpinr19 06c6 u 2 r x r < 6 : 0 > 0000 rpinr22 06cc s c k 2 r < 6 : 0 > s d i 2 r < 6 : 0 > 0000 rpinr23 06ce ss2r<6:0> 0000 rpinr24 06d0 csckr<6:0> c s d i r < 6 : 0 > 0000 rpinr25 06d2 cofsr<6:0> 0000 rpinr27 06d6 u3ctsr<6:0> u 3 r x r < 6 : 0 > 0000 rpinr28 06d8 u4ctsr<6:0> u 4 r x r < 6 : 0 > 0000 rpinr29 06da s c k 3 r < 6 : 0 > s d i 3 r < 6 : 0 > 0000 rpinr30 06dc ss3r<6:0> 0000 rpinr37 06ea synci1r<6:0> 0000 rpinr38 06ec d t c m p 1 r < 6 : 0 > 0000 rpinr39 06ee d t c m p 3 r < 6 : 0 > d t c m p 2 r < 6 : 0 > 0000 rpinr40 06f0 d t c m p 5 r < 6 : 0 > d t c m p 4 r < 6 : 0 > 0000 rpinr41 06f2 d t c m p 6 r < 6 : 0 > 0000 legend: = unimplemented, read as 0 . reset values are shown in hexadecimal. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 78 ? 2013-2014 microchip technology inc. table 4-35: nvm register map table 4-36: system control register map table 4-37: reference clock register map sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets nvmcon 0728 wr wren wrerr nvmsidl rpdf urerr nvmop3 nvmop2 nvmop1 nvmop0 0000 nvmadr 072a nvmadr<15:0> 0000 nvmadru 072c nvmadru<23:16> 0000 nvmkey 072e nvmkey<7:0> 0000 nvmsrcadrl 0730 nvmsrcadr<15:1> 00 0 0 0 nvmsrcadrh 0732 nvmsrcadrh<23:16> 0000 legend: = unimplemented, read as 0 . reset values are shown in hexadecimal. sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets rcon 0740 trapr iopuwr vregsf cm vregs extr swr swdten wdto sleep idle bor por note 1 osccon 0742 cosc2 cosc1 cosc0 nosc2 nosc1 nosc0 clklock iolock lock c f lposcen oswen note 2 clkdiv 0744 roi doze2 doze1 doze0 dozen frcdiv2 frcdiv1 frcdiv0 pllpost1 pllpost0 pllpre4 pllpre3 pllpre2 pllpre1 pllpre0 0030 pllfbd 0746 plldiv<8:0> 0030 osctun 0748 tun<5:0> 0000 legend: = unimplemented, read as 0 . reset values are shown in hexadecimal. note 1: rcon register reset values are dependent on the type of reset. 2: osccon register reset values are dependent on the configuration fuses. sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets refocon 074e roon rosslp rosel rodiv3 rodiv2 rodiv1 rodiv0 0000 legend: = unimplemented, read as 0 . reset values are shown in hexadecimal. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 79 dspic33epxxxgm3xx/6xx/7xx table 4-39: pmd register map for dspic33epxxxgm6xx/7xx devices table 4-38: parallel master/slave port register map ( 2 ) sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets pmcon 0600 pmpen psidl adrmux1 adrmux0 ptbeen ptwren ptrden csf1 csf0 alp cs2p cs1p bep wrsp rdsp 0000 pmmode 0602 busy irqm1 irqm0 incm1 incm0 mode16 mode1 mode0 waitb1 waitb0 waitm3 waitm 2 waitm1 waitm0 waite1 waite0 0000 pmaddr ( 1 ) 0604 cs2 cs1 parallel port address register (addr<13:0>) 0000 pmdout1 ( 1 ) 0604 parallel port data out register 1 (buffer levels 0 and 1) 0000 pmdout2 0606 parallel port data out register 2 (buffer levels 2 and 3) 0000 pmdin1 0608 parallel port data in register 1 (buffer levels 0 and 1) 0000 pmdin2 060a parallel port data in register 2 (buffer levels 2 and 3) 0000 pmaen 060c pten<15:0> 0000 pmstat 060e ibf ibov ib3f ib2f ib1f ib0f obe obuf ob3e ob2e ob1e ob0e 008f legend: = unimplemented, read as 0 . shaded bits are not used in the operation of the pmp module. note 1: pmaddr and pmdout1 are the same physical register, but are defined differently depend ing on the modules operating mode. 2: pmp is not present on 44-pin devices. sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets pmd1 0760 t5md t4md t3md t2md t1md qeimd pwmmd dcimd i2c1md u2md u1md spi2md s pi1md c2md c1md ad1md 0000 pmd2 0762 ic8md ic7md ic6md ic5md ic4md ic3md ic2md ic1md oc8md oc7md oc6md oc5md o c4md oc3md oc2md oc1md 0000 pmd3 0764 t9md t8md t7md t6md cmpmd rtccmd ( 1 ) pmpmd crcmd dacmd qei2md pwm2md u3md i2c3md i2c2md adc2md 0000 pmd4 0766 u 4 m d r e f o m dc t m u m d 0000 pmd6 076a pwm6md pwm5md pwm4md pwm3md pwm2md pwm1md spi3md 0000 pmd7 076c dma0md ptgmd 0000 dma1md dma2md dma3md legend: = unimplemented, read as 0 . reset values are shown in hexadecimal. note 1: the rtccmd bit is not available on 44-pin devices. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 80 ? 2013-2014 microchip technology inc. table 4-40: pmd register map for dspic33epxxxgm3xx devices sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets pmd1 0760 t5md t4md t3md t2md t1md qei1md pwmmd dcimd i2c1md u2md u1md spi 2md spi1md a d 1 m d 0000 pmd2 0762 ic8md ic7md ic6md ic5md ic4md ic3md ic2md ic1md oc8md oc7md oc6md oc5md oc4 md oc3md oc2md oc1md 0000 pmd3 0764 t9md t8md t7md t6md cmpmd rtccmd ( 1 ) pmpmd crcmd q e i 2 m d u 3 m d i2c2md adc2md 0000 pmd4 0766 u 4 m d r e f o m dc t m u m d 0000 pmd6 076a pwm6md pwm5md pwm4md pwm3md pwm2md pwm1md s p i 3 m d 0000 pmd7 076c dma0md ptgmd 0000 dma1md dma2md dma3md legend: = unimplemented, read as 0 . reset values are shown in hexadecimal. note 1: the rtccmd bit is not available on 44-pin devices. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 81 dspic33epxxxgm3xx/6xx/7xx table 4-41: op amp/comparator register map sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets cmstat 0a80 psidl c5evt c4evt c3evt c2evt c1evt c5out c4out c3out c2out c1out 0000 cvr1con 0a82 cvrr1 vrefsel cvren cvroe cvrr0 cvrss cvr3 cvr2 cvr1 cvr0 0000 cm1con 0a84 con coe cpol opmode cevt cout evpol1 evpol0 c r e f cch1 cch0 0000 cm1msksrc 0a86 selsrcc3 selsrcc2 selsrcc1 selsrcc0 selsrcb3 selsrcb2 selsrcb1 selsrcb0 selsrca3 selsrca2 selsrca1 s elsrca0 0000 cm1mskcon 0a88 hlms ocen ocnen oben obnen oaen oanen nags pags acen acnen aben abnen aaen aanen 0000 cm1fltr 0a8a cfsel2 cfsel1 cfsel0 cfltren cfdiv2 cfdiv1 cfdiv0 0000 cm2con 0a8c con coe cpol opmode cevt cout evpol1 evpol0 c r e f cch1 cch0 0000 cm2msksrc 0a8e selsrcc3 selsrcc2 selsrcc1 selsrcc0 selsrcb3 selsrcb2 selsrcb1 selsrcb0 selsrca3 selsrca2 selsrca1 s elsrca0 0000 cm2mskcon 0a90 hlms ocen ocnen oben obnen oaen oanen nags pags acen acnen aben abnen aaen aanen 0000 cm2fltr 0a92 cfsel2 cfsel1 cfsel0 cfltren cfdiv2 cfdiv1 cfdiv0 0000 cm3con 0a94 con coe cpol opmode cevt cout evpol1 evpol0 c r e f cch1 cch0 0000 cm3msksrc 0a96 selsrcc3 selsrcc2 selsrcc1 selsrcc0 selsrcb3 selsrcb2 selsrcb1 selsrcb0 selsrca3 selsrca2 selsrca1 s elsrca0 0000 cm3mskcon 0a98 hlms ocen ocnen oben obnen oaen oanen nags pags acen acnen aben abnen aaen aanen 0000 cm3fltr 0a9a cfsel2 cfsel1 cfsel0 cfltren cfdiv2 cfdiv1 cfdiv0 0000 cm4con 0a9c con coe cpol cevt cout evpol1 evpol0 c r e f cch1 cch0 0000 cm4msksrc 0a9e selsrcc3 selsrcc2 selsrcc1 selsrcc0 selsrcb3 selsrcb2 selsrcb1 selsrcb0 selsrca3 selsrca2 selsrca1 s elsrca0 0000 cm4mskcon 0aa0 hlms ocen ocnen oben obnen oaen oanen nags pags acen acnen aben abnen aaen aanen 0000 cm4fltr 0aa2 cfsel2 cfsel1 cfsel0 cfltren cfdiv2 cfdiv1 cfdiv0 0000 cm5con 0aa4 con coe cpol opmode cevt cout evpol1 evpol0 c r e f cch1 cch0 0000 cm5msksrc 0aa6 selsrcc3 selsrcc2 selsrcc1 selsrcc0 selsrcb3 selsrcb2 selsrcb1 selsrcb0 selsrca3 selsrca2 selsrca1 s elsrca0 0000 cm5mskcon 0aa8 hlms ocen ocnen oben obnen oaen oanen nags pags acen acnen aben abnen aaen aanen 0000 cm5fltr 0aaa cfsel2 cfsel1 cfsel0 cfltren cfdiv2 cfdiv1 cfdiv0 0000 cvr2con 0ab4 cvrr1 vrefsel cvren cvroe cvrr0 cvrss cvr3 cvr2 cvr1 cvr0 0000 legend: = unimplemented, read as 0 . reset values are shown in hexadecimal. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 82 ? 2013-2014 microchip technology inc. table 4-43: jtag interface register map table 4-42: ctmu register map sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 b it 3 bit 2 bit 1 bit 0 all resets ctmucon1 033a ctmuen ctmusidl tgen edgen edgseqen idissen cttrig 0000 ctmucon2 033c edg1mod edg1pol edg1sel3 edg1sel2 edg1sel1 edg1sel0 edg2s tat edg1stat edg2mod edg2pol edg2sel3 edg2sel2 edg2sel1 edg2sel0 0000 ctmuicon 033e itrim5 itrim4 itrim3 itrim2 itrim1 itrim0 irng1 irng0 0000 legend: = unimplemented, read as 0 . reset values are shown in hexadecimal. sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets jdatah 0ff0 jdatah<27:16> xxxx jdatal 0ff2 jdatal<15:0> 0000 legend: x = unknown value on reset; = unimplemented, read as 0 . reset values are shown in hexadecimal. table 4-44: real-time clock and calendar register map file name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 b it 4 bit 3 bit 2 bit 1 bit 0 all resets alrmval 0620 alarm value register window based on alrmptr<1:0> xxxx alcfgrpt 0622 alrmen chime amask3 amask2 amask1 amask0 alrmptr1 a lrmptr0 arpt7 arpt6 arpt5 arpt4 arpt3 arpt2 arpt1 arpt0 0000 rtcval 0624 rtcc value register window based on rtcptr<1:0> xxxx rcfgcal 0626 rtcen rtcwren rtcsync halfsec rtcoe rtcptr1 rtcptr0 cal7 cal6 cal5 cal4 cal3 cal2 cal1 cal0 0000 legend: x = unknown value on reset; = unimplemented, read as 0 . reset values are shown in hexadecimal. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 83 dspic33epxxxgm3xx/6xx/7xx table 4-45: dma controller register map sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 b it 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets dma0con 0b00 chen size dir half nullw amode1 amode0 m o d e 1m o d e 0 0000 dma0req 0b02 force irqsel7 irqsel6 irqsel5 irqsel4 irqsel3 irqsel2 irqsel1 irqsel0 00ff dma0stal 0b04 sta<15:0> 0000 dma0stah 0b06 s t a < 2 3 : 1 6 > 0000 dma0stbl 0b08 stb<15:0> 0000 dma0stbh 0b0a s t b < 2 3 : 1 6 > 0000 dma0pad 0b0c pad<15:0> 0000 dma0cnt 0b0e cnt<13:0> 0000 dma1con 0b10 chen size dir half nullw amode1 amode0 m o d e 1m o d e 0 0000 dma1req 0b12 force irqsel7 irqsel6 irqsel5 irqsel4 irqsel3 irqsel2 irqsel1 irqsel0 00ff dma1stal 0b14 sta<15:0> 0000 dma1stah 0b16 s t a < 2 3 : 1 6 > 0000 dma1stbl 0b18 stb<15:0> 0000 dma1stbh 0b1a s t b < 2 3 : 1 6 > 0000 dma1pad 0b1c pad<15:0> 0000 dma1cnt 0b1e cnt<13:0> 0000 dma2con 0b20 chen size dir half nullw amode1 amode0 m o d e 1m o d e 0 0000 dma2req 0b22 force irqsel7 irqsel6 irqsel5 irqsel4 irqsel3 irqsel2 irqsel1 irqsel0 00ff dma2stal 0b24 sta<15:0> 0000 dma2stah 0b26 s t a < 2 3 : 1 6 > 0000 dma2stbl 0b28 stb<15:0> 0000 dma2stbh 0b2a s t b < 2 3 : 1 6 > 0000 dma2pad 0b2c pad<15:0> 0000 dma2cnt 0b2e cnt<13:0> 0000 dma3con 0b30 chen size dir half nullw amode1 amode0 m o d e 1m o d e 0 0000 dma3req 0b32 force irqsel7 irqsel6 irqsel5 irqsel4 irqsel3 irqsel2 irqsel1 irqsel0 00ff dma3stal 0b34 sta<15:0> 0000 dma3stah 0b36 s t a < 2 3 : 1 6 > 0000 dma3stbl 0b38 stb<15:0> 0000 dma3stbh 0b3a s t b < 2 3 : 1 6 > 0000 dma3pad 0b3c pad<15:0> 0000 dma3cnt 0b3e cnt<13:0> 0000 dmapwc 0bf0 pwcol3 pwcol2 pwcol1 pwcol0 0000 dmarqc 0bf2 rqcol3 rqcol2 rqcol1 rqcol0 0000 dmapps 0bf4 ppst3 ppst2 ppst1 ppst0 0000 dmalca 0bf6 lstch<3:0> 000f dsadrl 0bf8 dsadr<15:0> 0000 dsadrh 0bfa dsadr<23:16> 0000 legend: = unimplemented, read as 0 . reset values are shown in hexadecimal. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 84 ? 2013-2014 microchip technology inc. table 4-46: porta register map for dspic33epxxxgm310/710 devices table 4-47: porta register map for dspic33epxxxgm306/706 devices table 4-48: porta register map for dspic33epxxxgm304/604 devices sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets trisa 0e00 trisa<15:14> trisa<12:7> trisa4 trisa<1:0> df9f porta 0e02 ra<15:14> r a < 1 2 : 7 > r a 4 ra<1:0> 0000 lata 0e04 lata<15:14> l a t a < 1 2 : 7 > l a t a 4 l a t a < 1 : 0 > 0000 odca 0e06 odca<15:14> odca<12:7> odca4 odca<1:0> 0000 cnena 0e08 cniea<15:14> cniea<12:7> cniea4 cniea<1:0> 0000 cnpua 0e0a cnpua<15:14> cnpua<12:7> cnpua4 cnpua<1:0> 0000 cnpda 0e0c cnpda<15:14> cnpda<12:7> cnpda4 cnpda<1:0> 0000 ansela 0e0e ansa<15:14> ansa<12:11> ansa9 ansa4 a n s a < 1 : 0 > 1813 legend: = unimplemented, read as 0 . reset values are shown in hexadecimal. sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets trisa 0e00 trisa<12:7> trisa4 trisa<1:0> df9f porta 0e02 r a < 1 2 : 7 > r a 4 ra<1:0> 0000 lata 0e04 l a t a < 1 2 : 7 > l a t a 4 l a t a < 1 : 0 > 0000 odca 0e06 odca<12:7> odca4 odca<1:0> 0000 cnena 0e08 cniea<12:7> cniea4 cniea<1:0> 0000 cnpua 0e0a cnpua<12:7> cnpua4 cnpua<1:0> 0000 cnpda 0e0c cnpda<12:7> cnpda4 cnpda<1:0> 0000 ansela 0e0e ansa<12:11> ansa9 ansa4 a n s a < 1 : 0 > 1813 legend: = unimplemented, read as 0 . reset values are shown in hexadecimal. sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets trisa 0e00 trisa<10:7> trisa<4:0> df9f porta 0e02 ra<10:7> r a < 4 : 0 > 0000 lata 0e04 lata<10:7> l a t a < 4 : 0 > 0000 odca 0e06 odca<10:7> odca<4:0> 0000 cnena 0e08 cniea<10:7> cniea<4:0> 0000 cnpua 0e0a cnpua<10:7> cnpua<4:0> 0000 cnpda 0e0c cnpda<10:7> cnpda<4:0> 0000 ansela 0e0e ansa9 ansa4 ansa<2:0> 1813 legend: = unimplemented, read as 0 . reset values are shown in hexadecimal. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 85 dspic33epxxxgm3xx/6xx/7xx table 4-49: portb register map for dspic33epxxxgm310/710 devices table 4-50: portb register map for dspic33epxxxgm306/706 devices table 4-51: portb register map for dspic33epxxxgm304/604 devices sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets trisb 0e10 trisb<15:0> df9f portb 0e12 rb<15:0> xxxx latb 0e14 latb<15:0> xxxx odcb 0e16 odcb<15:0> 0000 cnenb 0e18 cnieb<15:0> 0000 cnpub 0e1a cnpub<15:0> 0000 cnpdb 0e1c cnpdb<15:0> 0000 anselb 0e1e ansb<9:7> ansb<3:0> 010f legend: x = unknown value on reset; = unimplemented, read as 0 . reset values are shown in hexadecimal. sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets trisb 0e10 trisb<15:0> df9f portb 0e12 rb<15:0> xxxx latb 0e14 latb<15:0> xxxx odcb 0e16 odcb<15:0> 0000 cnenb 0e18 cnieb<15:0> 0000 cnpub 0e1a cnpub<15:0> 0000 cnpdb 0e1c cnpdb<15:0> 0000 anselb 0e1e ansb<9:7> ansb<3:0> 010f legend: x = unknown value on reset; = unimplemented, read as 0 . reset values are shown in hexadecimal. sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets trisb 0e10 trisb<15:0> ffff portb 0e12 rb<15:0> xxxx latb 0e14 latb<15:0> xxxx odcb 0e16 odcb<15:0> 0000 cnenb 0e18 cnieb<15:0> 0000 cnpub 0e1a cnpub<15:0> 0000 cnpdb 0e1c cnpdb<15:0> 0000 anselb 0e1e ansb<9:7> ansb<3:0> 010f legend: x = unknown value on reset; = unimplemented, read as 0 . reset values are shown in hexadecimal. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 86 ? 2013-2014 microchip technology inc. table 4-52: portc register map for dspic33epxxxgm310/710 devices table 4-53: portc register map for dspic33epxxxgm306/706 devices table 4-54: portc register map for dspic33epxxxgm304/604 devices sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets trisc 0e20 trisc15 trisc<13:0> bfff portc 0e22 rc15 rc<13:0> xxxx latc 0e24 latc15 latc<13:0> xxxx odcc 0e26 odcc15 odcc<13:0> 0000 cnenc 0e28 cniec15 cniec<13:0> 0000 cnpuc 0e2a cnpuc15 cnpuc<13:0> 0000 cnpdc 0e2c cnpdc15 cnpdc<13:0> 0000 anselc 0e2e ansc<12:10> ansc<5:0> 0807 legend: x = unknown value on reset; = unimplemented, read as 0 . reset values are shown in hexadecimal. sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets trisc 0e20 trisc15 trisc<13:0> bfff portc 0e22 rc15 rc<13:0> xxxx latc 0e24 latc15 latc<13:0> xxxx odcc 0e26 odcc15 odcc<13:0> 0000 cnenc 0e28 cniec15 cniec<13:0> 0000 cnpuc 0e2a cnpuc15 cnpuc<13:0> 0000 cnpdc 0e2c cnpdc15 cnpdc<13:0> 0000 anselc 0e2e ansc<5:0> 0807 legend: x = unknown value on reset, = unimplemented, read as 0 . reset values are shown in hexadecimal. sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets trisc 0e20 t r i s c < 9 : 0 > bfff portc 0e22 rc<9:0> xxxx latc 0e24 l a t c < 9 : 0 > xxxx odcc 0e26 odcc<9:0> 0000 cnenc 0e28 cniec<9:0> 0000 cnpuc 0e2a cnpuc<9:0> 0000 cnpdc 0e2c cnpdc<9 0000 anselc 0e2e ansc<5:0> 0807 legend: x = unknown value on reset; = unimplemented, read as 0 . reset values are shown in hexadecimal. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 87 dspic33epxxxgm3xx/6xx/7xx table 4-55: portd register map for dspic33epxxxgm310/710 devices table 4-56: portd register map for dspic33epxxxgm306/706devices table 4-57: porte register map for dspic33epxxxgm310/710 devices sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets trisd 0e30 trisd<15:12> t r i s d 8 t r i s d < 6 : 1 > 0160 portd 0e32 rd<15:12> rd8 rd<6:1> xxxx latd 0e34 latd<15:12> l a t d 8 l a t d < 6 : 1 > xxxx odcd 0e36 odcd<15:12> odcd8 odcd<6:1> 0000 cnend 0e38 cnied<15:12> cnied8 cnied<6:1> 0000 cnpud 0e3a cnpud<15:12> cnpud8 cnpud<6:1> 0000 cnpdd 0e3c cnpdd<15:12> cnpdd8 cnpdd<6:1> 0000 anseld 0e3e ansd<15:14> 0000 legend: x = unknown value on reset; = unimplemented, read as 0 . reset values are shown in hexadecimal. sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets trisd 0e30 t r i s d 8 t r i s d < 6 : 5 > 0160 portd 0e32 rd8 rd<6:5> xxxx latd 0e34 l a t d 8 l a t d < 6 : 5 > xxxx odcd 0e36 odcd8 odcd<6:5> 0000 cnend 0e38 cnied8 cnied<6:5> 0000 cnpud 0e3a cnpud8 cnpud<6:5> 0000 cnpdd 0e3c 0000 legend: x = unknown value on reset; = unimplemented, read as 0 . reset values are shown in hexadecimal. sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 b it 0 all resets trise 0e40 trise<15:12> t r i s e < 9 : 8 > trise<1:0> f303 porte 0e42 re<15:12> r e < 9 : 8 > r e < 1 : 0 > xxxx late 0e44 late<15:12> l a t e < 9 : 8 > l a t e < 1 : 0 > xxxx odce 0e46 odce<15:12> odce<9:8> odce<1:0> 0000 cnene 0e48 cniee<15:12> cniee<9:8> cniee<1:0> 0000 cnpue 0e4a cnpue<15:12> cnpue<9:8> cnpue<1:0> 0000 cnpde 0e4c cnpde<15:12> cnpde<9:8> cnpde<1:0> 0000 ansele 0e4e anse<15:12> anse<9:8> a n s e < 1 : 0 > 0000 legend: x = unknown value on reset; = unimplemented, read as 0 . reset values are shown in hexadecimal. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 88 ? 2013-2014 microchip technology inc. table 4-58: porte register map for dspic33epxxxgm306/706 devices table 4-59: portf register map for dspic33epxxxgm310/710 devices table 4-60: portf register map for dspic33epxxxgm306/706 devices sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets trise 0e40 trise<15:12> f000 porte 0e42 re<15:12> xxxx late 0e44 late<15:12> xxxx odce 0e46 odce<15:12> 0000 cnene 0e48 cniee<15:12> 0000 cnpue 0e4a cnpue<15:12> 0000 cnpde 0e4c cnpde<15:12> 0000 ansele 0e4e anse<15:12> 0000 legend: x = unknown value on reset; = unimplemented, read as 0 . reset values are shown in hexadecimal. sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets trisf 0e50 t r i s f < 1 3 : 1 2 > t r i s f < 1 0 : 9 > t r i s f < 7 : 4 > t r i s f < 1 : 0 > f303 portf 0e52 r f < 1 3 : 1 2 > r f < 1 0 : 9 > r f < 7 : 4 > rf<1:0> xxxx latf 0e54 l a t f < 1 3 : 1 2 > l a t f < 1 0 : 9 > latf<7:4> l a t f < 1 : 0 > xxxx odcf 0e56 odcf<13:12> odcf<10:9> odcf<7:4> o d c f < 1 : 0 > 0000 cnenf 0e58 cnief<13:12> cnief<10:9> cnief<7:4> cnief<1:0> 0000 cnpuf 0e5a cnpuf<13:12> cnpuf<10:9> cnpuf<7:4> cnpuf<1:0> 0000 cnpdf 0e5c cnpdf<13:12> cnpdf<10:9> cnpdf<7:4> cnpdf<1:0> 0000 anself 0e4e a n s f < 1 3 : 1 2 > a n s f < 1 0 : 9 > ansf<5:4> 0000 legend: x = unknown value on reset, = unimplemented, read as 0 . reset values are shown in hexadecimal. sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 b it 0 all resets trisf 0e50 t r i s f < 1 : 0 > 0003 portf 0e52 r f < 1 : 0 > xxxx latf 0e54 l a t f < 1 : 0 > xxxx odcf 0e56 odcf<1:0> 0000 cnenf 0e58 cnief<1:0> 0000 cnpuf 0e5a cnpuf<1:0> 0000 cnpdf 0e5c 0000 legend: x = unknown value on reset; = unimplemented, read as 0 . reset values are shown in hexadecimal. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 89 dspic33epxxxgm3xx/6xx/7xx table 4-61: portg register map for dspic33epxxxgm310/710 devices table 4-62: portg register map for dspic33epxxxgm306/706 devices table 4-63: pad config uration register map sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets trisg 0e60 trisg<15:6> t r i s g < 3 : 0 > 03c0 portg 0e62 rg<15:6> r g < 3 : 0 > xxxx latg 0e64 latg<15:6> l a t g < 3 : 0 > xxxx odcg 0e66 odcg<15:6> odcg<3:0> 0000 cneng 0e68 cnieg<15:6> cnieg<3:0> 0000 cnpug 0e6a cnpug<15:6> cnpug<3:0> 0000 cnpdg 0e6c cnpdg<15:6> cnpdg<3:0> 0000 anselg 0e6e ansg15 a n s g < 1 1 : 6 > a n s g < 3 : 2 > 0000 legend: x = unknown value on reset, = unimplemented, read as 0 . reset values are shown in hexadecimal. sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets trisg 0e60 t r i s g < 9 : 6 > 03c0 portg 0e62 r g < 9 : 6 > xxxx latg 0e64 l a t g < 9 : 6 > xxxx odcg 0e66 odcg<9:6> 0000 cneng 0e68 c n i e g < 9 : 6 > 0000 cnpug 0e6a cnpug<9:6> 0000 cnpdg 0e6c cnpdg<9:6> 0000 anselg 0e6e a n s g < 9 : 6 > 0000 legend: x = unknown value on reset; = unimplemented, read as 0 . reset values are shown in hexadecimal. file name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets padcfg1 0efe rtsecsel pmpttl 0000 legend: = unimplemented, read as 0 . reset values are shown in hexadecimal. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 90 ? 2013-2014 microchip technology inc. 4.3.1 paged memory scheme the dspic33epxxxgm3xx/6xx/7xx architecture extends the available data space through a paging scheme, which allows the available data space to be accessed using mov instructions in a linear fashion for pre- and post-modified effect ive addresses (ea). the upper half of the base data space address is used in conjunction with the data space page registers, the 10-bit data space read page register (dsrpag) or the 9-bit data space write page register (dswpag), to form an extended data space (eds) address, or program space visibility (psv) address. the data space page registers are located in the sfr space. construction of the eds address is shown in figure 4-8 . when dsrpag<9> = 0 and the base address bit, ea<15> = 1 , the dsrpag<8:0> bits are concatenated onto ea<14:0> to form the 24-bit eds read address. similarly, when the base address bit, ea<15> = 1 , the dswpag<8:0> bits are concatenated onto ea<14:0> to form the 24-bit eds write address. figure 4-8: extended data sp ace (eds) read address generation 1 dsrpag<8:0> 9 bits ea 15 bits select byte 24-bit eds ea select ea (dsrpag = dont care) no eds access select 16-bit ds ea byte ea<15> = 0 dsrpag 0 ea<15> note: ds read access when dsrpag = 0x000 will force an address error trap. = 1 ? dsrpag<9> y n generate psv address 0 downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 91 dspic33epxxxgm3xx/6xx/7xx figure 4-9: extended data space (eds) write address generation the paged memory scheme provides access to multiple 32-kbyte windows in the eds and psv memory. the data space page registers, dsxpag, in combination with the upper half of the data space address, can provide up to 16 mbytes of additional address space in the eds and 8 mbytes (dsrpag only) of psv address space. the paged data memory space is shown in figure 4-10 . the program space (ps) can be accessed with a dsrpag of 0x200 or greater. only reads from ps are supported using the dsrpag. writes to ps are not supported, so dswpag is dedicated to ds, including eds only. the data space and eds can be read from, and written to, using dsrpag and dswpag, respectively. 1 dswpag<8:0> 9 bits ea 15 bits byte 24-bit eds ea select ea (dswpag = dont care) no eds access select 16-bit ds ea byte ea<15> = 0 note: ds read access when dsrpag = 0x000 will force an address error trap. generate psv address 0 ea<15> downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 92 ? 2013-2014 microchip technology inc. figure 4-10: paged data memory space 0x0000 program memory 0x0000 0x7fff 0x7fff eds page 0x001 0x0000 sfr registers 0x0fff 0x1000 up to 16-kbyte 0x4fff local data space eds (dsrpag<9:0>/dswpag<8:0>) reserved (will produce an address error trap) 32-kbyte eds window 0xffff 0x5000 page 0 program space 0x00_0000 0x7f_ffff (lsw C <15:0>) 0x0000 (dsrpag = 0x001) (dswpag = 0x001) eds page 0x1ff (dsrpag = 0x1ff) (dswpag = 0x1ff) eds page 0x200 (dsrpag = 0x200) psv program memory eds page 0x2ff (dsrpag = 0x2ff) eds page 0x300 (dsrpag = 0x300) eds page 0x3ff (dsrpag = 0x3ff) 0x7fff 0x0000 0x7fff 0x0000 0x7fff 0x0000 0x7fff 0x0000 0x7fff ds_addr<14:0> ds_addr<15:0> (lsw) psv program memory (msb) table address space (tblpag<7:0>) program memory 0x00_0000 0x7f_ffff (msb C <23:16>) 0x0000 (tblpag = 0x00) 0xffff ds_addr<15:0> lsw using tblrdl / tblwtl , msb using tblrdh / tblwth 0x0000 (tblpag = 0x7f) 0xffff lsw using tblrdl / tblwtl , msb using tblrdh / tblwth (instruction & data) no writes allowed no writes allowed no writes allowed no writes allowed ram (1) 0x7fff 0x8000 note 1: for 128k flash devices. ram size and end location are dependent on the device; see section 4.2 data address space for more information. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 93 dspic33epxxxgm3xx/6xx/7xx allocating different page registers for read and write access allows the architecture to support data movement between different pages in data memory. this is accomplished by setting the dsrpag register value to the page from which you want to read and configuring the dswpag register to the page to which it needs to be written. data can also be moved from different psv to eds pages by configuring the dsrpag and dswpag registers to address psv and eds space, respectively. the data can be moved between pages by a single instruction. when an eds or psv page overflow or underflow occurs, ea<15> is cleared as a result of the register indirect ea calculation. an overflow or underflow of the ea in the eds or psv pages can occur at the page boundaries when: the initial address, prior to modification, addresses an eds or psv page the ea calculation uses pre- or post-modified register indirect addressing. however, this does not include register offset addressing in general, when an overflow is detected, the dsxpag register is incremented and the ea<15> bit is set to keep the base address within the eds or psv window. when an underflow is detected, the dsxpag register is decremented and the ea<15> bit is set to keep the base address within the eds or psv window. this creates a linear eds and psv address space, but only when using register indirect addressing modes. exceptions to the operation described above arise when entering and exiting the boundaries of page 0, eds and psv spaces. ta b l e 4 - 6 4 lists the effects of overflow and underflow scenarios at different boundaries. in the following cases, when overflow or underflow occurs, the ea<15> bit is set and the dsxpag is not modified; therefore, the ea will wrap to the beginning of the current page: register indirect with register offset addressing modulo addressing bit-reversed addressing table 4-64: overflow and underflow scenarios at page 0, eds and psv space boundaries ( 2 , 3 , 4 ) o/u, r/w operation before after dsxpag ds ea<15> page description dsxpag ds ea<15> page description o, read [++wn] or [wn++] dsrpag = 0x1ff 1 eds: last page dsrpag = 0x1ff 0 see note 1 o, read dsrpag = 0x2ff 1 psv: last lsw page dsrpag = 0x300 1 psv: first msb page o, read dsrpag = 0x3ff 1 psv: last msb page dsrpag = 0x3ff 0 see note 1 o, write dswpag = 0x1ff 1 eds: last page dswpag = 0x1ff 0 see note 1 u, read [--wn] or [wn--] dsrpag = 0x001 1 psv page dsrpag = 0x001 0 see note 1 u, read dsrpag = 0x200 1 psv: first lsw page dsrpag = 0x200 0 see note 1 u, read dsrpag = 0x300 1 psv: first msb page dsrpag = 0x2ff 1 psv: last lsw page legend: o = overflow, u = underflow, r = read, w = write note 1: the register indirect addressing now addresses a location in the base data space (0x0000-0x8000). 2: an eds access with dsxpag = 0x000 will generate an address error trap. 3: only reads from ps are supported using dsrpag. an attempt to write to ps using dswpag will generate an address error trap. 4: pseudo linear addressing is not supported for large offsets. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 94 ? 2013-2014 microchip technology inc. 4.3.2 extended x data space the lower portion of the base address space range, between 0x0000 and 0x7fff, is always accessible regardless of the contents of the data space page registers. it is indirectly addressable through the register indirect instructions. it can be regarded as being located in the default eds page 0 (i.e., eds address range of 0x000000 to 0x007fff with the base address bit, ea<15> = 0 , for this address range). however, page 0 cannot be accessed through the upper 32 kbytes, 0x8000 to 0xffff, of base data space, in combination with dsrpag = 0x000 or dswpag = 0x000. consequently, dsrpag and dswpag are initialized to 0x001 at reset. the remaining pages, including both eds and psv pages, are only accessible using the dsrpag or dswpag register, in combination with the upper 32 kbytes, 0x8000 to 0xffff, of the base address, where the base address bit, ea<15> = 1 . for example, when dsrpag = 0x001 or dswpag = 0x001, accesses to the upper 32 kbytes, 0x8000 to 0xffff, of the data space will map to the eds address range of 0x008000 to 0x00ffff. when dsrpag = 0x002 or dswpag = 0x002, accesses to the upper 32 kbytes of the data space will map to the eds address range of 0x010000 to 0x017fff and so on, as shown in the eds memory map in figure 4-11 . for more information on the psv page access, using data space page registers, refer to the program space visibility from data space section in program memory (ds70613) of the ?dspic33/ pic24 family reference manual? . figure 4-11: eds memory map note 1: dsxpag should not be used to access page 0. an eds access with dsxpag set to 0x000 will generate an address error trap. 2: clearing the dsxpag in software has no effect. 0x0080000x010000 0x018000 page 3 page 2 page 1fd 0xfe8000 0xff0000 0xff8000 page 1ff page 1fe sfr/ds 0x0000 0xffff eds ea address (24 bits) ds conventional ea<15:0> 0x8000 (page 0) (dsrpag<8:0>, ea<14:0>) (dswpag<8:0>, ea<14:0>) page 1 dsrpag<9> = 0 ds address downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 95 dspic33epxxxgm3xx/6xx/7xx 4.3.3 data memory arbitration and bus master priority eds accesses from bus masters in the system are arbitrated. the arbiter for data memory (including eds) arbitrates between the cpu, the dma and the icd module. in the event of coincidental access to a bus by the bus masters, the arbiter determines which bus master access has the highest priority. the other bus masters are suspended and processed after the access of the bus by the bus master with the highest priority. by default, the cpu is bus master 0 (m0) with the highest priority and the icd is bus master 4 (m4) with the lowest priority. the remaining bus master (dma controller) is allocated to m3 (m1 and m2 are reserved and cannot be used). the user application may raise or lower the priority of the dma controller to be above that of the cpu by setting the appropriate bits in the eds bus master priority control (mstrpr) register. all bus masters with raised priorities will maintain the same priority relationship relative to each other (i.e., m1 being highest and m3 being lowest with m2 in between). also, all the bus masters with priorities below that of the cpu maintain the same priority relationship relative to each other. the priority schemes for bus masters with different mstrpr values are tabulated in table 4-65 . this bus master priority control allows the user application to manipulate the real-time response of the system, either statically during initialization or dynamically in response to real-time events. table 4-65: data memory bus arbiter priority figure 4-12: arbiter architecture priority mstrpr<15:0> bit setting ( 1 ) 0x0000 0x0020 m0 (highest) cpu dma m1 reserved cpu m2 reserved reserved m3 dma reserved m4 (lowest) icd icd note 1: all other values of mstrpr<15:0> are reserved. icd reserved data memory arbiter m0 m1 m2 m3 m4 mstrpr<15:0> dma cpu sram downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 96 ? 2013-2014 microchip technology inc. 4.3.4 software stack the w15 register serves as a dedicated software stack pointer (ssp) and is automatically modified by exception processing, subroutine calls and returns; however, w15 can be referenced by any instruction in the same manner as all other w registers. this simplifies reading, writing and manipulating of the stack pointer (for example, creating stack frames). w15 is initialized to 0x1000 during all resets. this address ensures that the ssp points to valid ram in all dspic33epxxxgm3xx/6xx/7xx devices and permits stack availability for non-maskable trap exceptions. these can occur before the ssp is initialized by the user software. you can reprogram the ssp during initialization to any location within data space. the software stack pointer always points to the first available free word and fills the software stack, working from lower toward higher addresses. figure 4-13 illustrates how it pre-decrements for a stack pop (read) and post-increments for a stack push (writes). when the pc is pushed onto the stack, pc<15:0> are pushed onto the first available stack word, then pc<22:16> are pushed into the second available stack location. for a pc push during any call instruction, the msb of the pc is zero-extended before the push, as shown in figure 4-13 . during exception processing, the msb of the pc is concatenated with the lower 8 bits of the cpu status register, sr. this allows the contents of srl to be preserved automatically during interrupt processing. figure 4-13: call stack frame 4.4 instruction addressing modes the addressing modes shown in ta b l e 4 - 6 6 form the basis of the addressing modes optimized to support the specific features of the individual instructions. the addressing modes provided in the mac class of instructions differ from those in the other instruction types. 4.4.1 file register instructions most file register instructions use a 13-bit address field (f) to directly address data present in the first 8192 bytes of data memory (near data space). most file register instructions employ a working register, w0, which is denoted as wreg in these instructions. the destination is typically either the same file register or wreg (with the exception of the mul instruction), which writes the result to a register or register pair. the mov instruction allows additional flexibility and can access the entire data space. 4.4.2 mcu instructions the three-operand mcu instructions are of the form: operand 3 = operand 1 operand 2 where operand 1 is always a working register (that is, the addressing mode can only be register direct), which is referred to as wb. operand 2 can be a w register fetched from data memory or a 5-bit literal. the result location can be either a w register or a data memory location. the following addressing modes are supported by mcu instructions: register direct register indirect register indirect post-modified register indirect pre-modified 5-bit or 10-bit literal note: to protect against misaligned stack accesses, w15<0> is fixed to 0 by the hardware. note 1: to maintain the software stack pointer (w15) coherency, w15 is never subject to (eds) paging, and is therefore, restricted to an address range of 0x0000 to 0xffff. the same applies to the w14 when used as a stack frame pointer (sfa = 1 ). 2: as the stack can be placed in, and can access x and y spaces, care must be taken regarding its use, particularly with regard to local automatic variables in a c development environment note: not all instructions support all of the addressing modes given above. individ- ual instructions can support different subsets of these addressing modes. pc<15:0> b000000000 0 15 w15 (before call ) w15 (after call ) stack grows toward higher address 0x0000 pc<22:16> call subr downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 97 dspic33epxxxgm3xx/6xx/7xx table 4-66: fundamental addressing modes supported 4.4.3 move and accumulator instructions move instructions and the dsp accumulator class of instructions provide a greater degree of addressing flexibility than other instructions. in addition to the addressing modes supported by most mcu instructions, move and accumulator instructions also support register indirect with register offset addressing mode, also referred to as register indexed mode. in summary, the following addressing modes are supported by move and accumulator instructions: register direct register indirect register indirect post-modified register indirect pre-modified register indirect with register offset (indexed) register indirect with literal offset 8-bit literal 16-bit literal 4.4.4 mac instructions the dual source operand dsp instructions ( clr , ed , edac , mac , mpy , mpy.n , movsac and msc ), also referred to as mac instructions, use a simplified set of addressing modes to allow the user application to effectively manipulate the data pointers through register indirect tables. the two-source operand prefetch registers must be members of the set {w8, w9, w10, w11}. for data reads, w8 and w9 are always directed to the x ragu, and w10 and w11 are always directed to the y agu. the effective addresses generated (before and after modification) must, therefore, be valid addresses within x data space for w8 and w9, and y data space for w10 and w11. in summary, the following addressing modes are supported by the mac class of instructions: register indirect register indirect post-modified by 2 register indirect post-modified by 4 register indirect post-modified by 6 register indirect with register offset (indexed) 4.4.5 other instructions besides the addressing modes outlined previously, some instructions use literal constants of various sizes. for example, bra (branch) instructions use 16-bit signed literals to specify the branch destination directly, whereas the disi instruction uses a 14-bit unsigned literal field. in some instructions, such as ulnk , the source of an operand or result is implied by the opcode itself. certain operations, such as nop , do not have any operands. addressing mode description file register direct the address of the file register is specified explicitly. register direct the contents of a register are accessed directly. register indirect the contents of wn form the effective address (ea). register indirect post-modified the contents of wn form the ea. wn i s post-modified (incremented or decremented) by a constant value. register indirect pre-modified wn is pre-modified (incremented or decremented) by a signed constant value to form the ea. register indirect with register offset (register indexed) the sum of wn and wb forms the ea. register indirect with literal offset the sum of wn and a literal forms the ea. note: for the mov instructions, the addressing mode specified in the instruction can differ for the source and destination ea. how- ever, the 4-bit wb (register offset) field is shared by both source and destination (but typically only used by one). note: not all instructions support all the addressing modes given above. individual instructions may support different subsets of these addressing modes. note: register indirect with register offset addressing mode is available only for w9 (in x space) and w11 (in y space). downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 98 ? 2013-2014 microchip technology inc. 4.5 modulo addressing modulo addressing mode is a method of providing an automated means to support circular data buffers using hardware. the objective is to remove the need for software to perform data address boundary checks when executing tightly looped code, as is typical in many dsp algorithms. modulo addressing can operate in either data or program space (since the data pointer mechanism is essentially the same for both). one circular buffer can be supported in each of the x (which also provides the pointers into program space) and y data spaces. modulo addressing can operate on any w register pointer. however, it is not advisable to use w14 or w15 for modulo addressing since these two registers are used as the stack frame pointer and stack pointer, respectively. in general, any particular circular buffer can be config- ured to operate in only one direction, as there are certain restrictions on the buffer start address (for incrementing buffers) or end address (for decrementing buffers), based upon the direction of the buffer. the only exception to the usage restrictions is for buffers that have a power-of-two length. as these buffers satisfy the start and end address criteria, they can operate in a bidirectional mode (that is, address boundary checks are performed on both the lower and upper address boundaries). 4.5.1 start and end address the modulo addressing scheme requires that a starting and ending address be specified and loaded into the 16-bit modulo buffer address registers: xmodsrt, xmodend, ymodsrt and ymodend (see table 4-1 ). the length of a circular buffer is not directly specified. it is determined by the difference between the corresponding start and end addresses. the maximum possible length of the circular buffer is 32k words (64 kbytes). 4.5.2 w address register selection the modulo and bit-reversed addressing control register bits, modcon<15:0>, contain enable flags as well as a w register field to specify the w address regis- ters. the xwm and ywm fields select the registers that operate with modulo addressing: if xwm = 1111 , x ragu and x wagu modulo addressing is disabled if ywm = 1111 , y agu modulo addressing is disabled the x address space pointer w register (xwm) to which modulo addressing is to be applied is stored in modcon<3:0> (see table 4-1 ). modulo addressing is enabled for x data space when xwm is set to any value other than 1111 and the xmoden bit is set (modcon<15>). the y address space pointer w register (ywm) to which modulo addressing is to be applied is stored in modcon<7:4>. modulo addressing is enabled for y data space when ywm is set to any value other than 1111 and the ymoden bit is set (modcon<14>). figure 4-14: modulo address ing operation example note: y space modulo addressing ea calcula- tions assume word-sized data (lsb of every ea is always clear). 0x1100 0x1163 start addr = 0x1100 end addr = 0x1163 length = 0x0032 words byte address mov #0x1100, w0 mov w0, xmodsrt ;set modulo start address mov #0x1163, w0 mov w0, modend ;set modulo end address mov #0x8001, w0 mov w0, modcon ;enable w1, x agu for modulo mov #0x0000, w0 ;w0 holds buffer fill value mov #0x1110, w1 ;point w1 to buffer do again, #0x31 ;fill the 50 buffer locations mov w0, [w1++] ;fill the next location again: inc w0, w0 ;increment the fill value downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 99 dspic33epxxxgm3xx/6xx/7xx 4.5.3 modulo addressing applicability modulo addressing can be applied to the effective address (ea) calculation associated with any w register. address boundaries check for addresses equal to: the upper boundary addresses for incrementing buffers the lower boundary addresses for decrementing buffers it is important to realize that the address boundaries check for addresses less than or greater than the upper (for incrementing buffers) and lower (for decrementing buffers) boundary addresses (not just equal to). address changes can, therefore, jump beyond boundaries and still be adjusted correctly. 4.6 bit-reversed addressing bit-reversed addressing mode is intended to simplify data reordering for radix-2 fft algorithms; it is supported by the x agu for data writes only. the modifier, which can be a constant value or register contents, is regarded as having its bit order reversed. the address source and destination are kept in normal order. thus, the only operand requiring reversal is the modifier. 4.6.1 bit-reversed addressing implementation bit-reversed addressing mode is enabled when all of these conditions are met: bwm bits (w register selection) in the modcon register are any value other than 1111 (the stack cannot be accessed using bit-reversed addressing) the bren bit is set in the xbrev register the addressing mode used is register indirect with pre-increment or post-increment if the length of a bit-reversed buffer is m = 2 n bytes, the last n bits of the data buffer start address must be zeros. xb<14:0> is the bit-reversed addressing modifier, or pivot point, which is typically a constant. in the case of an fft computation, its value is equal to half of the fft data buffer size. when enabled, bit-reversed addressing is executed only for register indirect with pre-increment or post- increment addressing and word-sized data writes. it does not function for any other addressing mode or for byte-sized data and normal addresses are generated instead. when bit-reversed addressing is active, the w address pointer is always added to the address modifier (xb) and the offset associated with the register indirect addressing mode is ignored. in addition, as word-sized data is a requirement, the lsb of the ea is ignored (and always clear). if bit-reversed addressing has already been enabled by setting the bren (xbrev<15>) bit, a write to the xbrev register should not be immediately followed by an indirect read operation using the w register that has been designated as the bit-reversed pointer. note: the modulo corrected effective address is written back to the register only when pre-modify or post-modify addressing mode is used to compute the effective address. when an address offset (such as [w7 + w2]) is used, modulo addressing correction is performed, but the contents of the register remain unchanged. note: all bit-reversed ea calculations assume word-sized data (lsb of every ea is always clear). the xb value is scaled accordingly to generate compatible (byte) addresses. note: modulo addressing and bit-reversed addressing can be enabled simultaneously using the same w register, but bit-reversed addressing operation will always take precedence for data writes when enabled. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 100 ? 2013-2014 microchip technology inc. figure 4-15: bit-reversed addressing example table 4-67: bit-reversed addres sing sequence (16-entry) normal address bit-reversed address a3 a2 a1 a0 decimal a3 a2 a1 a0 decimal 0000 0 0000 0 0001 1 1000 8 0010 2 0100 4 0011 3 1100 12 0100 4 0010 2 0101 5 1010 10 0110 6 0110 6 0111 7 1110 14 1000 8 0001 1 1001 9 1001 9 1010 10 0101 5 1011 11 1101 13 1100 12 0011 3 1101 13 1011 11 1110 14 0111 7 1111 15 1111 15 b3 b2 b1 0 b2 b3 b4 0 bit locations swapped, left-to-right, around center of binary value bit-reversed address xb = 0x0008 for a 16-word bit-reversed buffer b7 b6 b5 b1 b7 b6 b5 b4 b11 b10 b9 b8 b11 b10 b9 b8 b15 b14 b13 b12 b15 b14 b13 b12 sequential address pivot point downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 101 dspic33epxxxgm3xx/6xx/7xx 4.7 interfacing program and data memory spaces the dspic33epxxxgm3xx/6xx/7xx architecture uses a 24-bit-wide program space and a 16-bit-wide data space. the architecture is also a modified harvard scheme, meaning that data can also be present in the program space. to use this data successfully, it must be accessed in a way that preserves the alignment of information in both spaces. aside from normal execution, the architecture of the dspic33epxxxgm3xx/6xx/7xx devices provides two methods by which program space can be accessed during operation: using table instructions to access individual bytes or words anywhere in the program space remapping a portion of the program space into the data space (program space visibility) table instructions allow an application to read or write to small areas of the program memory. this capability makes the method ideal for accessing data tables that need to be updated periodically. it also allows access to all bytes of the program word. the remapping method allows an application to access a large block of data on a read-only basis, which is ideal for look-ups from a large table of static data. the application can only access the least significant word of the program word. table 4-68: program space address construction figure 4-16: data access from program space address generation access type access space program space address <23> <22:16> <15> <14:1> <0> instruction access (code execution) user 0 pc<22:1> 0 0xx xxxx xxxx xxxx xxxx xxx0 tblrd/tblwt (byte/word read/write) user tblpag<7:0> data ea<15:0> 0xxx xxxx xxxx xxxx xxxx xxxx configuration tblpag<7:0> data ea<15:0> 1xxx xxxx xxxx xxxx xxxx xxxx 0 program counter 23 bits program counter (1) tblpag 8 bits ea 16 bits byte select 0 1/0 user/configuration table operations (2) space select 24 bits 1/0 note 1: the least significant bit (lsb) of program space addresses is always fixed as 0 to maintain word alignment of data in the program and data spaces. 2: table operations are not required to be word-aligned. table read operations are permitted in the configuration memory space. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 102 ? 2013-2014 microchip technology inc. 4.7.1 data access from program memory using table instructions the tblrdl and tblwtl instructions offer a direct method of reading or writing the lower word of any address within the program space without going through data space. the tblrdh and tblwth instructions are the only method to read or write the upper 8 bits of a program space word as data. the pc is incremented by two for each successive 24-bit program word. this allows program memory addresses to directly map to data space addresses. program memory can thus be regarded as two 16-bit- wide word address spaces, residing side by side, each with the same address range. tblrdl and tblwtl access the space that contains the least significant data word. tblrdh and tblwth access the space that contains the upper data byte. two table instructions are provided to move byte or word-sized (16-bit) data to and from program space. both function as either byte or word operations. tblrdl (table read low): - in word mode, this instruction maps the lower word of the program space location (p<15:0>) to a data address (d<15:0>) - in byte mode, either the upper or lower byte of the lower program word is mapped to the lower byte of a data address. the upper byte is selected when byte select is 1 ; the lower byte is selected when it is 0 . tblrdh (table read high): - in word mode, this instruction maps the entire upper word of a program address (p<23:16>) to a data address. the phantom byte (d<15:8>) is always 0 . - in byte mode, this instruction maps the upper or lower byte of the program word to d<7:0> of the data address in the tblrdl instruc- tion. the data is always 0 when the upper phantom byte is selected (byte select = 1 ). in a similar fashion, two table instructions, tblwth and tblwtl , are used to write individual bytes or words to a program space address. the details of their operation are explained in section 5.0 flash program memory . for all table operations, the area of program memory space to be accessed is determined by the table page register (tblpag). tblpag covers the entire program memory space of the device, including user application and configuration spaces. when tblpag<7> = 0 , the table page is located in the user memory space. when tblpag<7> = 1 , the page is located in configuration space. figure 4-17: accessing program memory with table instructions 0 8 16 23 00000000 00000000 00000000 00000000 phantom byte tblrdh.b (wn<0> = 0 ) tblrdl.w tblrdl.b (wn<0> = 1 ) tblrdl.b (wn<0> = 0 ) 23 15 0 tblpag 02 0x000000 0x800000 0x020000 0x030000 program space the address for the table operation is determined by the data ea within the page defined by the tblpag register. only read operations are shown; write operations are also valid in the user memory area. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 103 dspic33epxxxgm3xx/6xx/7xx 5.0 flash program memory the dspic33epxxxgm3xx/6xx/7xx devices contain internal flash program memory for storing and executing application code. the memory is readable, writable and erasable during normal operation, over the entire v dd range. flash memory can be programmed in two ways: in-circuit serial programming? (icsp?) run-time self-programming (rtsp) icsp allows for a dspic33epxxxgm3xx/6xx/7xx device to be serially programmed while in the end application circuit. this is done with two lines for programming clock and programming data (one of the alternate programming pin pairs: pgecx/pgedx), and three other lines for power (v dd ), ground (v ss ) and master clear (mclr ). this allows customers to manufacture boards with unprogrammed devices and then program the device just before shipping the product. this also allows the most recent firmware or a custom firmware to be programmed. rtsp is accomplished using tblrd (table read) and tblwt (table write) instructions. with rtsp, the user application can write program memory data as a double program memory word, a row of 64 instructions (192 bytes), and erase program memory in blocks of 512 instruction words (1536 bytes) at a time. 5.1 table instructions and flash programming the flash memory read and the double-word programming operations make use of the tblrd and tblwt instructions, respectively. these allow direct read and write access to the program memory space from the data memory while the device is in normal operating mode. the 24-bit target addr ess in the program memory is formed using the tblpag<7:0> bits and the effective address (ea) from a w register, specified in the table instruction, as shown in figure 5-1 . the tblrdl and the tblwtl instructions are used to read or write to bits<15:0> of program memory. tblrdl and tblwtl can access program memory in both word and byte modes. the tblrdh and tblwth instructions are used to read or write to bits<23:16> of program memory. tblrdh and tblwth can also access program memory in word or byte mode. figure 5-1: addressing for table registers note 1: this data sheet summarizes the features of the dspic33epxxxgm3xx/6xx/7xx family of devices. it is not intended to be a comprehensive reference source. to complement the information in this data sheet, refer to the ?dspic33/pic24 family reference manual? , flash programming (ds70609), which is available from the microchip web site ( www.microchip.com ). 2: some registers and associated bits described in this section may not be available on all devices. refer to section 4.0 memory organization in this data sheet for device-specific register and bit information. 0 program counter 24 bits program counter tblpag reg 8 bits working reg ea 16 bits byte 24-bit ea 0 1/0 select using table instruction using user/configuration space select downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 104 ? 2013-2014 microchip technology inc. 5.2 rtsp operation rtsp allows the user application to erase a single page of memory, program a row and to program two instruction words at a time. see tab le 1 in the dspic33epxxxgm3xx/6xx/7xx product family section for the page sizes of each device. the flash program memory array is organized into rows of 64 instructions or 192 bytes. rtsp allows the user application to erase a page of program memory, which consists of eight rows (512 instructions) at a time, and to program one row or two adjacent words at a time. the 8-row erase pages and single row write rows are edge-aligned, from the beginning of program memory, on boundaries of 1536 bytes and 192 bytes, respectively. for more information on erasing and programming flash memory, refer to the ?dspic33/pic24 family reference manual? , flash programming (ds70609). 5.3 programming operations a complete programming sequence is necessary for pro- gramming or erasing the internal flash in rtsp mode. the processor stalls (waits) until the programming operation is finished. for erase and program times, refer to parameters d137a and d137b (page erase time), and d138a and d138b (word write cycle time), in table 33-13 . setting the wr bit (nvmcon<15>) starts the opera- tion and the wr bit is automatically cleared when the operation is finished. 5.3.1 programming algorithm for flash program memory programmers can program two adjacent words (24 bits x 2) of program flash memory at a time on every other word address boundary (0x000002, 0x000006, 0x00000a, etc.). to do this, it is necessary to erase the page that contains the desired address of the location the user wants to change. programmers can also program a row of data (64 instruction words/ 192 bytes) at a time using the row programming feature present in these devices. for row programming, the source data is fetched directly from the data memory (ram) on these devices. two new registers have been provided to point to the ram location where the source data resides. the page that has the row to be pro- grammed must first be erased before the programming operation. for protection against accidental operations, the write initiate sequence for nvmkey must be used to allow any erase or program operation to proceed. after the programming command has been executed, the user application must wait for the programming time until programming is complete. the two instructions follow- ing the start of the programming sequence should be nop s. refer to the ?dspic33/pic24 family reference man- ual , flash programming (ds70609) for details and code examples on programming using rtsp. 5.4 control registers six sfrs are used to read and write the program flash memory: nvmcon, nvmkey, nvmadr, nvmadru, nvmsrcadrl and nvmsrcadrh. the nvmcon register ( register 5-1 ) controls which blocks are to be erased, which memory type is to be programmed and the start of the programming cycle. nvmkey ( register 5-4 ) is a write-only register that is used for write protection. to start a programming or erase sequence, the user application must consecutively write 0x55 and 0xaa to the nvmkey register. there are two nvm address registers: nvmadru and nvmadr. these two registers, when concatenated, form the 24-bit effective address (ea) of the selected word for programming operations, or the selected page for erase operations. the nvmadru register is used to hold the upper 8 bits of the ea, while the nvmadr register is used to hold the lower 16 bits of the ea. the nvmsrcadrh and nvmsrcadrl registers are used to hold the source address of the data in the data memory that needs to be written to flash memory. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 105 dspic33epxxxgm3xx/6xx/7xx register 5-1: nvmcon: nonvolatil e memory (nvm) control register r/so-0 ( 1 ) r/w-0 ( 1 ) r/w-0 ( 1 ) r/w-0 u-0 u-0 r/w-0 r/w-0 wr wren wrerr nvmsidl ( 2 ) rpdf urerr ( 6 ) bit 15 bit 8 u-0 u-0 u-0 u-0 r/w-0 ( 1 ) r/w-0 ( 1 ) r/w-0 ( 1 ) r/w-0 ( 1 ) n v m o p 3 ( 3 , 4 ) nvmop2 ( 3 , 4 ) nvmop1 ( 3 , 4 ) nvmop0 ( 3 , 4 ) bit 7 bit 0 legend: so = settable only bit r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 wr: nvm write control bit ( 1 ) 1 = initiates a flash memory program or erase operation; the operation is self-timed and the bit is cleared by hardware once the operation is complete 0 = program or erase operation is complete and inactive bit 14 wren: nvm write enable bit ( 1 ) 1 = enables flash program/erase operations 0 = inhibits flash program/erase operations bit 13 wrerr: nvm write sequence error flag bit ( 1 ) 1 = an improper program or erase sequence attempt, or termination has occurred (bit is s et automatically on any set attempt of the wr bit) 0 = the program or erase operation completed normally bit 12 nvmsidl: nvm stop in idle control bit ( 2 ) 1 = flash voltage regulator goes into standby mode during idle mode 0 = flash voltage regulator is active during idle mode bit 11-10 unimplemented: read as 0 bit 9 rpdf: bus mastered row programming data format control bit 1 = row data to be stored in ram in compressed format 0 = row data to be stored in ram in uncompressed format bit 8 urerr: bus mastered row programming data underrun error flag bit ( 6 ) 1 = indicates that a bus mastered row programming operation has been termination due to a data underrun error 0 = indicates no data underrun error is detected bit 7-4 unimplemented: read as 0 note 1: these bits can only be reset on por. 2: if this bit is set, there will be minimal power savings (i idle ), and upon exiting idle mode, there is a delay (t vreg ) before flash memory becomes operational. 3: all other combinations of nvmop<3:0> are unimplemented. 4: execution of the pwrsav instruction is ignored while any of the nvm operations are in progress. 5: two adjacent words on a 4-word boundary are programmed during execution of this operation. 6: when urerr is set, the bus mastered row programming operation will terminate with the wrerr bit still set. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 106 ? 2013-2014 microchip technology inc. bit 3-0 nvmop<3:0>: nvm operation select bits ( 1 , 3 , 4 ) 1111 = reserved 1110 = reserved 1101 = bulk erase primary program flash memory 1100 = reserved 1011 = reserved 1010 = reserved 0011 = memory page erase operation 0010 = memory row program operation with source data from ram 0001 = memory double-word program operation ( 5 ) 0000 = reserved register 5-1: nvmcon: nonv olatile memory (nvm) cont rol register (continued) note 1: these bits can only be reset on por. 2: if this bit is set, there will be minimal power savings (i idle ), and upon exiting idle mode, there is a delay (t vreg ) before flash memory becomes operational. 3: all other combinations of nvmop<3:0> are unimplemented. 4: execution of the pwrsav instruction is ignored while any of the nvm operations are in progress. 5: two adjacent words on a 4-word boundary are programmed during execution of this operation. 6: when urerr is set, the bus mastered row programming operation will terminate with the wrerr bit still set. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 107 dspic33epxxxgm3xx/6xx/7xx register 5-2: nvmadru: nonvolatil e memory upper address register u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 15 bit 8 r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x nvmadru<23:16> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-8 unimplemented: read as 0 bit 7-0 nvmadru<23:16>: nonvolatile memory upper write address bits selects the upper 8 bits of the location to program or erase in program flash memory. this register may be read or written to by the user application. register 5-3: nvmadr: nonvolatil e memory lower address register r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x nvmadr<15:8> bit 15 bit 8 r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x nvmadr<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 nvmadr<15:0>: nonvolatile memory lower write address bits selects the lower 16 bits of the location to program or erase in program flash memory. this register may be read or written to by the user application. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 108 ? 2013-2014 microchip technology inc. register 5-4: nvmkey: nonvolatile memory key register register 5-5: nvmsrcadrh: nonvolatile data memory upper address register u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 15 bit 8 w-0 w-0 w-0 w-0 w-0 w-0 w-0 w-0 nvmkey<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-8 unimplemented: read as 0 bit 7-0 nvmkey<7:0>: nvm key register (write-only) bits u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 15 bit 8 r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x nvmsrcadrh<23:16> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-8 unimplemented: read as 0 bit 7-0 nvmsrcadrh<23:16>: nonvolatile data memory upper address bits downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 109 dspic33epxxxgm3xx/6xx/7xx register 5-6: nvmsrcadrl: nonvolatile data memory lower address register r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x nvmsrcadrl<15:8> bit 15 bit 8 r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r-0 nvmsrcadrl<7:1> 0 bit 7 bit 0 legend: r = reserved bit r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-1 nvmsrcadrl<15:1>: nonvolatile data memory lower address bits bit 0 reserved: maintain as 0 downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 110 ? 2013-2014 microchip technology inc. notes: downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 111 dspic33epxxxgm3xx/6xx/7xx 6.0 resets the reset module combines all reset sources and controls the device master reset signal, sysrst . the following is a list of device reset sources: por: power-on reset bor: brown-out reset mclr : master clear pin reset swr: reset instruction wdto: watchdog timer time-out reset cm: configuration mismatch reset trapr: trap conflict reset iopuwr: illegal condition device reset - illegal opcode reset - illegal address mode reset - uninitialized w register reset - security reset a simplified block diagram of the reset module is shown in figure 6-1 . any active source of reset will make the sysrst signal active. on system reset, some of the registers associated with the cpu and peripherals are forced to a known reset state and some are unaffected. all types of device reset set a corresponding status bit in the rcon register to indicate the type of reset (see register 6-1 ). a por clears all the bits, except for the por and bor bits (rcon<1:0>) that are set. the user application can set or clear any bit at any time during code execution. the rcon bits only serve as status bits. setting a particular reset status bit in software does not cause a device reset to occur. the rcon register also has other bits associated with the watchdog timer and device power-saving states. the function of these bits is discussed in other sections of this manual. figure 6-1: reset sy stem block diagram note 1: this data sheet summarizes the features of the dspic33epxxxgm3xx/6xx/7xx family of devices. it is not intended to be a comprehensive reference source. to com- plement the information in this data sheet, refer to the ?dspic33/pic24 family refer- ence manual? , reset (ds70602), which is available from the microchip web site ( www.microchip.com ). 2: some registers and associated bits described in this section may not be available on all devices. refer to section 4.0 memory organization in this data sheet for device-specific register and bit information. note: refer to the specific peripheral section or section 4.0 memory organization of this manual for register reset states. note: the status bits in the rcon register should be cleared after they are read so that the next rcon register value after a device reset is meaningful. note: in all types of resets, to select the device clock source, the contents of osccon are initialized from the fnoscx configuration bits in the foscsel configuration register. mclr v dd bor sleep or idle reset instruction wdt module glitch filter trap conflict illegal opcode uninitialized w register sysrst v dd rise detect por configuration mismatch security reset internal regulator illegal address mode downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 112 ? 2013-2014 microchip technology inc. register 6-1: rcon: re set control register ( 1 ) r/w-0 r/w-0 u-0 u-0 r/w-0 u-0 r/w-0 r/w-0 trapr iopuwr v r e g s f c mv r e g s bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-1 r/w-1 extr swr swdten ( 2 ) wdto sleep idle bor por bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 trapr: trap reset flag bit 1 = a trap conflict reset has occurred 0 = a trap conflict reset has not occurred bit 14 iopuwr: illegal opcode or uninitialized w access reset flag bit 1 = an illegal opcode detection, an illegal address mode or uninitialized w register used as an address pointer caused a reset 0 = an illegal opcode or uninitialized w register reset has not occurred bit 13-12 unimplemented: read as 0 bit 11 vregsf: flash voltage regulator standby during sleep bit 1 = flash voltage regulator is active during sleep 0 = flash voltage regulator goes into standby mode during sleep bit 10 unimplemented: read as 0 bit 9 cm: configuration mismatch flag bit 1 = a configuration mismatch reset has occurred. 0 = a configuration mismatch reset has not occurred bit 8 vregs: voltage regulator standby during sleep bit 1 = voltage regulator is active during sleep 0 = voltage regulator goes into standby mode during sleep bit 7 extr: external reset (mclr ) pin bit 1 = a master clear (pin) reset has occurred 0 = a master clear (pin) reset has not occurred bit 6 swr: software reset (instruction) flag bit 1 = a reset instruction has been executed 0 = a reset instruction has not been executed bit 5 swdten: software enable/disable of wdt bit ( 2 ) 1 = wdt is enabled 0 = wdt is disabled bit 4 wdto: watchdog timer time-out flag bit 1 = wdt time-out has occurred 0 = wdt time-out has not occurred note 1: all of the reset status bits can be set or cleared in software. setting one of these bits in soft ware does not cause a device reset. 2: if the fwdten configuration bit is 1 (unprogrammed), the wdt is always enabled, regardless of the swdten bit setting. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 113 dspic33epxxxgm3xx/6xx/7xx bit 3 sleep: wake-up from sleep flag bit 1 = device was in sleep mode 0 = device was not in sleep mode bit 2 idle: wake-up from idle flag bit 1 = device was in idle mode 0 = device was not in idle mode bit 1 bor: brown-out reset flag bit 1 = a brown-out reset has occurred 0 = a brown-out reset has not occurred bit 0 por: power-on reset flag bit 1 = a power-on reset has occurred 0 = a power-on reset has not occurred register 6-1: rcon: re set control register ( 1 ) (continued) note 1: all of the reset status bits can be set or cleared in software. setting one of these bits in soft ware does not cause a device reset. 2: if the fwdten configuration bit is 1 (unprogrammed), the wdt is always enabled, regardless of the swdten bit setting. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 114 ? 2013-2014 microchip technology inc. notes: downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 115 dspic33epxxxgm3xx/6xx/7xx 7.0 interrupt controller the dspic33epxxxgm3xx/6xx/7xx interrupt con- troller reduces the numerous peripheral interrupt request signals to a single interrupt request signal to the dspic33epxxxgm3xx/6xx/7xx cpu. the interrupt controller has the following features: up to eight processor exceptions and software traps eight user-selectable priority levels interrupt vector table (ivt) with a unique vector for each interrupt or exception source fixed priority within a specified user priority level fixed interrupt entry and return latencies 7.1 interrupt vector table the dspic33epxxxgm3xx/6xx/7xx interrupt vector table (ivt), shown in figure 7-1 , resides in program memory, starting at location, 000004h. the ivt contains seven non-maskable trap vectors and up to 151 sources of interrupt. in general, each interrupt source has its own vector. each interrupt vector contains a 24-bit-wide address. the value programmed into each interrupt vector location is the starting address of the associated interrupt service routine (isr). interrupt vectors are prioritized in terms of their natural priority. this priority is linked to their position in the vector table. lower addresses generally have a higher natural priority. for example, the interrupt associated with vector 0 takes priority over interrupts at any other vector address. 7.2 reset sequence a device reset is not a true exception because the interrupt controller is not involved in the reset process. the dspic33epxxxgm3xx/6xx/7xx devices clear their registers in response to a reset, which forces the pc to zero. the device then begins program execution at location, 0x000000. a goto instruction at the reset address can redirect program execution to the appropriate start-up routine. note 1: this data sheet summarizes the features of the dspic33epxxxgm3xx/6xx/7xx family of devices. it is not intended to be a comprehensive reference source. to complement the information in this data sheet, refer to the dspic33/pic24 fam- ily reference manual? , interrupts (ds70000600), which is available from the microchip web site ( www.microchip.com ). 2: some registers and associated bits described in this section may not be available on all devices. refer to section 4.0 memory organization in this data sheet for device-specific register and bit information. note: any unimplemented or unused vector locations in the ivt should be pro- grammed with the address of a default interrupt handler routine that contains a reset instruction. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 116 ? 2013-2014 microchip technology inc. figure 7-1: dspic33epxxxgm3xx/6xx/7xx interrupt vector table ivt decreasing natural order priority reset C goto instruction 0x000000 reset C goto address 0x000002 oscillator fail trap vector 0x000004 address error trap vector 0x000006 generic hard trap vector 0x000008 stack error trap vector 0x00000a math error trap vector 0x00000c dma controller error trap vector 0x00000e generic soft trap vector 0x000010 reserved 0x000012 interrupt vector 0 0x000014 interrupt vector 1 0x000016 :::: :: interrupt vector 52 0x00007c interrupt vector 53 0x00007e interrupt vector 54 0x000080 :::: :: interrupt vector 116 0x0000fc interrupt vector 117 0x0000fe interrupt vector 118 0x000100 interrupt vector 119 0x000102 interrupt vector 120 0x000104 :::: :: interrupt vector 244 0x0001fc interrupt vector 245 0x0001fe start of code 0x000200 see ta b l e 7 - 1 for interrupt vector details downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 117 dspic33epxxxgm3xx/6xx/7xx table 7-1: interrupt vector details interrupt source vector # irq # ivt address interrupt bit location flag enable priority highest natural order priority int0 C external interrupt 0 8 0 0x000014 ifs0<0> iec0<0> ipc0<2:0> ic1 C input capture 1 9 1 0x000016 ifs0<1> iec0<1> ipc0<6:4> oc1 C output compare 1 10 2 0x000018 ifs0<2> iec0<2> ipc0<10:8> t1 C timer1 11 3 0x00001a ifs0<3> iec0<3> ipc0<14:12> dma0 C dma channel 0 12 4 0x00001c ifs0<4> iec0<4> ipc1<2:0> ic2 C input capture 2 13 5 0x00001e ifs0<5> iec0<5> ipc1<6:4> oc2 C output compare 2 14 6 0x000020 ifs0<6> iec0<6> ipc1<10:8> t2 C timer2 15 7 0x000022 ifs0<7> iec0<7> ipc1<14:12> t3 C timer3 16 8 0x000024 ifs0<8> iec0<8> ipc2<2:0> spi1e C spi1 error 17 9 0x000026 ifs0<9> iec0<9> ipc2<6:4> spi1 C spi1 transfer done 18 10 0x000028 ifs0<10> iec0<10> ipc2<10:8> u1rx C uart1 receiver 19 11 0x00002a ifs0<11> iec0<11> ipc2<14:12> u1tx C uart1 transmitter 20 12 0x00002c ifs0<12> iec0<12> ipc3<2:0> ad1 C adc1 convert done 21 13 0x00002e ifs0<13> iec0<13> ipc3<6:4> dma1 C dma channel 1 22 14 0x000030 ifs0<14> iec0<14> ipc3<10:8> reserved 23 15 0x000032 si2c1 C i2c1 slave event 24 16 0x000034 ifs1<0> iec1<0> ipc4<2:0> mi2c1 C i2c1 master event 25 17 0x000036 ifs1<1> iec1<1> ipc4<6:4> cmp1 C comparator combined event 26 18 0x000038 ifs1<2> iec1<2> ipc4<10:8> cn C input change interrupt 27 19 0x00003a ifs1<3> iec1<3> ipc4<14:12> int1 C external interrupt 1 28 20 0x00003c ifs1<4> iec1<4> ipc5<2:0> ad2 C adc2 convert done 29 21 0x00003e ifs1<5> iec1<5> ipc5<6:4> ic7 C input capture 7 30 22 0x000040 ifs1<6> iec1<6> ipc5<10:8> ic8 C input capture 8 31 23 0x000042 ifs1<7> iec1<7> ipc5<14:12> dma2 C dma channel 2 32 24 0x000044 ifs1<8> iec1<8> ipc6<2:0> oc3 C output compare 3 33 25 0x000046 ifs1<9> iec1<9> ipc6<6:4> oc4 C output compare 4 34 26 0x000048 ifs1<10> iec1<10> ipc6<10:8> t4 C timer4 35 27 0x00004a ifs1<11> iec1<11> ipc6<14:12> t5 C timer5 36 28 0x00004c ifs1<12> iec1<12> ipc7<2:0> int2 C external interrupt 2 37 29 0x00004e ifs1<13> iec1<13> ipc7<6:4> u2rx C uart2 receiver 38 30 0x000050 ifs1<14> iec1<14> ipc7<10:8> u2tx C uart2 transmitter 39 31 0x000052 ifs1<15> iec1<15> ipc7<14:12> spi2e C spi2 error 40 32 0x000054 ifs2<0> iec2<0> ipc8<2:0> spi2 C spi2 transfer done 41 33 0x000056 ifs2<1> iec2<1> ipc8<6:4> c1rx C can1 rx data ready ( 1 ) 42 34 0x000058 ifs2<2> iec2<2> ipc8<10:8> c1 C can1 event ( 1 ) 43 35 0x00005a ifs2<3> iec2<3> ipc8<14:12> dma3 C dma channel 3 44 36 0x00005c ifs2<4> iec2<4> ipc9<2:0> ic3 C input capture 3 45 37 0x00005e ifs2<5> iec2<5> ipc9<6:4> ic4 C input capture 4 46 38 0x000060 ifs2<6> iec2<6> ipc9<10:8> ic5 C input capture 5 47 39 0x000062 ifs2<7> iec2<7> ipc9<14:12> ic6 C input capture 6 48 40 0x000064 ifs2<8> iec2<8> ipc10<2:0> note 1: this interrupt source is available on dspic33epxxxgm6xx/7xx devices o nly. 2: this interrupt source is not available on 44-pin devices. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 118 ? 2013-2014 microchip technology inc. oc5 C output compare 5 49 41 0x000066 ifs2<9> iec2<9> ipc10<6:4> oc6 C output compare 6 50 42 0x000068 ifs2<10> iec2<10> ipc10<10:8> oc7 C output compare 7 51 43 0x00006a ifs2<11> iec2<11> ipc10<14:12> oc8 C output compare 8 52 44 0x00006c ifs2<12> iec2<12> ipc11<2:0> pmp C parallel master port ( 2 ) 53 45 0x00006e ifs2<13> iec2<13> ipc11<6:4> reserved 54 46 0x000070 t6 C timer6 55 47 0x000072 ifs2<15> iec2<15> ipc11<14:12> t7 C timer7 56 48 0x000074 ifs3<0> iec3<0> ipc12<2:0> si2c2 C i2c2 slave event 57 49 0x000076 ifs3<1> iec3<1> ipc12<6:4> mi2c2 C i2c2 master event 58 50 0x000078 ifs3<2> iec3<2> ipc12<10:8> t8 C timer8 59 51 0x00007a ifs3<3> iec3<3> ipc12<14:12> t9 C timer9 60 52 0x00007c ifs3<4> iec3<4> ipc13<2:0> int3 C external interrupt 3 61 53 0x00007e ifs3<5> iec3<5> ipc13<6:4> int4 C external interrupt 4 62 54 0x000080 ifs3<6> iec3<6> ipc13<10:8> c2rx C can2 rx data ready ( 1 ) 63 55 0x000082 ifs3<7> iec3<7> ipc13<14:12> c2 C can2 event ( 1 ) 64 56 0x000084 ifs3<8> iec3<8> ipc14<2:0> psem C pcpwm primary event 65 57 0x000086 ifs3<9> iec3<9> ipc14<6:4> qei1 C qei1 position counter compare 66 58 0x000088 ifs3<10> iec3<10 > ipc14<10:8> dcie C dci fault interrupt 67 59 0x00008a ifs3<11> iec3<11> ipc14<14:12> dci C dci transfer done 68 60 0x00008c ifs3<12> iec3<12> ipc15<2:0> reserved 69 61 0x00008e rtcc C real-time clock and calendar ( 2 ) 70 62 0x000090 ifs3<14> iec3<14> ipc15<10:8> reserved 71-72 63-64 0x000092-0x000094 u1e C uart1 error interrupt 73 65 0x000096 ifs4<1> iec4<1> ipc16<6:4> u2e C uart2 error interrupt 74 66 0x000098 ifs4<2> iec4<2> ipc16<10:8> crc C crc generator interrupt 75 67 0x00009a ifs4<3> iec4<3> ipc16<14:12> reserved 76-77 68-69 0x00009c-0x00009e c1tx C can1 tx data request ( 1 ) 78 70 0x0000a0 ifs4<6> iec4<6> ipc17<10:8> c2tx C can2 tx data request ( 1 ) 79 71 0x0000a2 ifs4<7> iec4<7> ipc17<14:12> reserved 80 72 0x0000a4 psesm C pcpwm secondary event 81 73 0x0000a6 ifs4<9> iec4<9> ipc18<6:4> reserved 82 74 0x0000a8 qei2 C qei2 position counter compare 83 75 0x0000aa ifs4<11> iec4<11> ipc1 8<14:12> reserved 84 76 0x0000ac ctmu C ctmu interrupt 85 77 0x0000ae ifs4<13> iec4<13> ipc19<6:4> reserved 86-88 78-80 0x0000b0-0x0000b4 u3e C uart3 error interrupt 89 81 0x0000b6 ifs5<1> iec5<1> ipc20<6:4> u3rx C uart3 receiver 90 82 0x0000b8 ifs5<2> iec5<2> ipc20<10:8> u3tx C uart3 transmitter 91 83 0x0000ba ifs5<3> iec5<3> ipc20<14:12> reserved 92-94 84-86 0x0000bc-0x0000c0 u4e C uart4 error interrupt 95 87 0x0000c2 ifs5<7> iec5<7> ipc21<14:12> u4rx C uart4 receiver 96 88 0x0000c4 ifs5<8> iec5<8> ipc22<2:0> u4tx C uart4 transmitter 97 89 0x0000c6 ifs5<9> iec5<9> ipc22<6:4> table 7-1: interrupt vector details (continued) interrupt source vector # irq # ivt address interrupt bit location flag enable priority note 1: this interrupt source is available on dspic33epxxxgm6xx/7xx devices o nly. 2: this interrupt source is not available on 44-pin devices. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 119 dspic33epxxxgm3xx/6xx/7xx spi3e C spi3 error 98 90 0x0000c8 ifs5<10> iec5<10> ipc22<10:8> spi3 C spi3 transfer done 99 91 0x0000ca ifs5<11> iec5<11> ipc22<14:12> reserved 100-101 92-93 0x0000cc-0x0000ce pwm1 C pwm generator 1 102 94 0x0000d0 ifs5<14> iec5<14> ipc23<10:8> pwm2 C pwm generator 2 103 95 0x0000d2 ifs5<15> iec5<15> ipc23<14:12> pwm3 C pwm generator 3 104 96 0x0000d4 ifs6<0> iec6<0> ipc24<2:0> pwm4 C pwm generator 4 105 97 0x0000d6 ifs6<1> iec6<1> ipc24<6:4> pwm5 C pwm generator 5 106 98 0x0000d8 ifs6<2> iec6<2> ipc24<10:8> pwm6 C pwm generator 6 107 99 0x0000da ifs6<3> iec6<3> ipc24<14:12> reserved 108-149 100-141 0x0000dc-0x00012e icd C icd application 150 142 0x000142 ifs8<14> iec8<14> ipc35<10:8> jtag C jtag programming 151 143 0x000130 ifs8<15> iec8<15> ipc35<14:12> reserved 152 144 0x000134 ptgstep C ptg step 153 145 0x000136 ifs9<1> iec9<1> ipc36<6:4> ptgwdt C ptg watchdog time-out 154 146 0x000138 ifs9<2> iec9<2> ipc36<10:8> ptg0 C ptg interrupt 0 155 147 0x00013a ifs9<3> iec9<3> ipc36<14:12> ptg1 C ptg interrupt 1 156 148 0x00013c ifs9<4> iec9<4> ipc37<2:0> ptg2 C ptg interrupt 2 157 149 0x00013e ifs9<5> iec9<5> ipc37<6:4> ptg3 C ptg interrupt 3 158 150 0x000140 ifs9<6> iec9<6> ipc37<10:8> reserved 159-245 151-245 0x000142-0x0001fe lowest natural order priority table 7-1: interrupt vector details (continued) interrupt source vector # irq # ivt address interrupt bit location flag enable priority note 1: this interrupt source is available on dspic33epxxxgm6xx/7xx devices o nly. 2: this interrupt source is not available on 44-pin devices. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 120 ? 2013-2014 microchip technology inc. 7.3 interrupt control and status registers dspic33epxxxgm3xx/6xx/7xx devices implement the following registers for the interrupt controller: intcon1 intcon2 intcon3 intcon4 ifsx iecx ipcx inttreg 7.3.1 intcon1 through intcon4 global interrupt control functions are controlled from intcon1, intcon2, intcon3 and intcon4. intcon1 contains the interrupt nesting disable bit (nstdis) as well as the control and status flags for the processor trap sources. the intcon2 register controls external interrupt request signal behavior and also contains the global interrupt enable bit (gie). intcon3 contains the status flags for the dma and do stack overflow status trap sources. the intcon4 register contains the software generated hard trap (sght) status bit. 7.3.2 ifsx the ifsx registers maintain all of the interrupt request flags. each source of interrupt has a status bit, which is set by the respective peripherals or external signal and is cleared via software. 7.3.3 iecx the iecx registers maintain all of the interrupt enable bits. these control bits are used to individually enable interrupts from the peripherals or external signals. 7.3.4 ipcx the ipcx registers are used to set the interrupt priority level (ipl) for each source of interrupt. each user interrupt source can be assigned to one of eight priority levels. 7.3.5 inttreg the inttreg register contains the associated interrupt vector number and the new cpu interrupt priority level, which are latched into vector number (vecnum<7:0>) and interrupt level (ilr<3:0>) bit fields in the inttreg register. the new interrupt priority level is the priority of the pending interrupt. the interrupt sources are assigned to the ifsx, iecx and ipcx registers in the same sequence as they are listed in table 7-1 . for example, the int0 (external interrupt 0) is shown as having vector number 8 and a natural order priority of 0. thus, the int0if bit is found in ifs0<0>, the int0ie bit in iec0<0> and the int0ip bits in the first position of ipc0 (ipc0<2:0>). 7.3.6 status/control registers although these registers are not specifically part of the interrupt control hardware, two of the cpu control registers contain bits that control interrupt functionality. for more information on these registers, refer to the ?dspic33/pic24 family reference manual? , cpu (ds70359). the cpu status register, sr, contains the ipl<2:0> bits (sr<7:5>). these bits indicate the current cpu interrupt priority level. the user software can change the current cpu interrupt priority level by writing to the iplx bits. the corcon register contains the ipl3 bit, which together with ipl<2:0>, also indicates the current cpu interrupt priority level. ipl3 is a read-only bit so that trap events cannot be masked by the user software. all interrupt registers are described in register 7-3 through register 7-7 in the following pages. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 121 dspic33epxxxgm3xx/6xx/7xx register 7-1: sr: cpu status register ( 1 ) r/w-0 r/w-0 r/w-0 r/w-0 r/c-0 r/c-0 r-0 r/w-0 oa ob sa sb oab sab da dc bit 15 bit 8 r/w-0 ( 3 ) r/w-0 ( 3 ) r/w-0 ( 3 ) r-0 r/w-0 r/w-0 r/w-0 r/w-0 ipl2 ( 2 ) ipl1 ( 2 ) ipl0 ( 2 ) ra n ov z c bit 7 bit 0 legend: c = clearable bit r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-5 ipl<2:0>: cpu interrupt priority level status bits ( 2 , 3 ) 111 = cpu interrupt priority level is 7 (15); user interrupts are disabled 110 = cpu interrupt priority level is 6 (14) 101 = cpu interrupt priority level is 5 (13) 100 = cpu interrupt priority level is 4 (12) 011 = cpu interrupt priority level is 3 (11) 010 = cpu interrupt priority level is 2 (10) 001 = cpu interrupt priority level is 1 (9) 000 = cpu interrupt priority level is 0 (8) note 1: for complete register details, see register 3-1 . 2: the ipl<2:0> bits are concatenated with the ipl<3> bit (corcon<3>) to form the cpu interrupt priority level. the value in parentheses indicates the ipl if ipl<3> = 1 . user interrupts are disabled when ipl<3> = 1 . 3: the ipl<2:0> status bits are read-only when the nstdis bit (intcon1<15>) = 1 . downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 122 ? 2013-2014 microchip technology inc. register 7-2: corcon: core control register ( 1 ) r/w-0 u-0 r/w-0 r/w-0 r/w-0 r-0 r-0 r-0 var us1 us0 edt dl2 dl1 dl0 bit 15 bit 8 r/w-0 r/w-0 r/w-1 r/w-0 r/c-0 r-0 r/w-0 r/w-0 sata satb satdw accsat ipl3 ( 2 ) sfa rnd if bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 var: variable exception processing latency control bit 1 = variable exception processing latency is enabled 0 = fixed exception processing latency is enabled bit 3 ipl3: cpu interrupt priority level status bit 3 ( 2 ) 1 = cpu interrupt priority level is greater than 7 0 = cpu interrupt priority level is 7 or less note 1: for complete register details, see register 3-2 . 2: the ipl3 bit is concatenated with the ipl<2:0> bits (sr<7:5>) to form the cpu interrupt priority level. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 123 dspic33epxxxgm3xx/6xx/7xx register 7-3: intcon1: in terrupt control register 1 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 nstdis ovaerr ovberr covaerr covberr ovate ovbte covte bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 u-0 sftacerr div0err dmacerr matherr addrerr stkerr oscfail bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 nstdis: interrupt nesting disable bit 1 = interrupt nesting is disabled 0 = interrupt nesting is enabled bit 14 ovaerr: accumulator a overflow trap flag bit 1 = trap was caused by overflow of accumulator a 0 = trap was not caused by overflow of accumulator a bit 13 ovberr: accumulator b overflow trap flag bit 1 = trap was caused by overflow of accumulator b 0 = trap was not caused by overflow of accumulator b bit 12 covaerr: accumulator a catastrophic overflow trap flag bit 1 = trap was caused by catastrophic overflow of accumulator a 0 = trap was not caused by catastrophic overflow of accumulator a bit 11 covberr: accumulator b catastrophic overflow trap flag bit 1 = trap was caused by catastrophic overflow of accumulator b 0 = trap was not caused by catastrophic overflow of accumulator b bit 10 ovate: accumulator a overflow trap enable bit 1 = trap overflow of accumulator a 0 = trap is disabled bit 9 ovbte: accumulator b overflow trap enable bit 1 = trap overflow of accumulator b 0 = trap is disabled bit 8 covte: catastrophic overflow trap enable bit 1 = trap on catastrophic overflow of accumulator a or b is enabled 0 = trap is disabled bit 7 sftacerr: shift accumulator error status bit 1 = math error trap was caused by an invalid accumulator shift 0 = math error trap was not caused by an invalid accumulator shift bit 6 div0err: divide-by-zero error status bit 1 = math error trap was caused by a divide-by-zero 0 = math error trap was not caused by a divide-by-zero bit 5 dmacerr: dma controller trap flag bit 1 = dma controller trap has occurred 0 = dma controller trap has not occurred bit 4 matherr: math error status bit 1 = math error trap has occurred 0 = math error trap has not occurred downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 124 ? 2013-2014 microchip technology inc. bit 3 addrerr: address error trap status bit 1 = address error trap has occurred 0 = address error trap has not occurred bit 2 stkerr: stack error trap status bit 1 = stack error trap has occurred 0 = stack error trap has not occurred bit 1 oscfail: oscillator failure trap status bit 1 = oscillator failure trap has occurred 0 = oscillator failure trap has not occurred bit 0 unimplemented: read as 0 register 7-3: intcon1: interrupt control register 1 (continued) downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 125 dspic33epxxxgm3xx/6xx/7xx register 7-4: intcon2: in terrupt control register 2 r/w-1 r/w-0 r/w-0 u-0 u-0 u-0 u-0 u-0 gie disi swtrap bit 15 bit 8 u-0 u-0 u-0 u-0 u-0 r/w-0 r/w-0 r/w-0 int2ep int1ep int0ep bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 gie: global interrupt enable bit 1 = interrupts and associated iecx bits are enabled 0 = interrupts are disabled, but traps are still enabled bit 14 disi: disi instruction status bit 1 = disi instruction is active 0 = disi instruction is not active bit 13 swtrap: software trap status bit 1 = software trap is enabled 0 = software trap is disabled bit 12-3 unimplemented: read as 0 bit 2 int2ep: external interrupt 2 edge detect polarity select bit 1 = interrupt on negative edge 0 = interrupt on positive edge bit 1 int1ep: external interrupt 1 edge detect polarity select bit 1 = interrupt on negative edge 0 = interrupt on positive edge bit 0 int0ep: external interrupt 0 edge detect polarity select bit 1 = interrupt on negative edge 0 = interrupt on positive edge downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 126 ? 2013-2014 microchip technology inc. register 7-5: intcon3: in terrupt control register 3 u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 15 bit 8 u-0 u-0 r/w-0 r/w-0 u-0 u-0 u-0 u-0 d a ed o o v r bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-6 unimplemented: read as 0 bit 5 dae: dma address error soft trap status bit 1 = dma address error soft trap has occurred 0 = dma address error soft trap has not occurred bit 4 doovr: do stack overflow soft trap status bit 1 = do stack overflow soft trap has occurred 0 = do stack overflow soft trap has not occurred bit 3-0 unimplemented: read as 0 register 7-6: intcon4: in terrupt control register 4 u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 15 bit 8 u-0 u-0 u-0 u-0 u-0 u-0 u-0 r/w-0 s g h t bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-1 unimplemented: read as 0 bit 0 sght: software generated hard trap status bit 1 = software generated hard trap has occurred 0 = software generated hard trap has not occurred downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 127 dspic33epxxxgm3xx/6xx/7xx register 7-7: inttreg: interrupt control and status register u-0 u-0 u-0 u-0 r-0 r-0 r-0 r-0 ilr3 ilr2 ilr1 ilr0 bit 15 bit 8 r-0 r-0 r-0 r-0 r-0 r-0 r-0 r-0 vecnum7 vecnum6 vecnum5 vecnum4 vecnum3 vecnum2 vecnum1 vecnum0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-12 unimplemented: read as 0 bit 11-8 ilr<3:0>: new cpu interrupt priority level bits 1111 = cpu interrupt priority level is 15 0001 = cpu interrupt priority level is 1 0000 = cpu interrupt priority level is 0 bit 7-0 vecnum<7:0>: vector number of pending interrupt bits 11111111 = 255, reserved; do not use 00001001 = 9, ic1 C input capture 1 00001000 = 8, int0 C external interrupt 0 00000111 = 7, reserved; do not use 00000110 = 6, generic soft error trap 00000101 = 5, dma controller error trap 00000100 = 4, math error trap 00000011 = 3, stack error trap 00000010 = 2, generic hard trap 00000001 = 1, address error trap 00000000 = 0, oscillator fail trap downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 128 ? 2013-2014 microchip technology inc. notes: downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 129 dspic33epxxxgm3xx/6xx/7xx 8.0 direct memory access (dma) the dma controller transfers data between peripheral data registers and data space sram in addition, dma can access the entire data memory space. the data memory bus arbiter is utilized when either the cpu or dma attempts to access sram, resulting in potential dma or cpu stalls. the dma controller supports 4 independent channels. each channel can be configured for transfers to or from selected peripherals. the peripherals supported by the dma controller include: can analog-to-digital converter (adc) serial peripheral interface (spi) uart input capture output compare dci pmp timers refer to tab le 8 -1 for a complete list of supported peripherals. figure 8-1: peripheral to dma controller note 1: this data sheet summarizes the features of the dspic33epxxxgm3xx/6xx/7xx family of devices. it is not intended to be a comprehensive reference source. to com- plement the information in this data sheet, refer to the ?dspic33/pic24 family reference manual , direct memory access (dma) (ds70348), which is available from the microchip web site ( www.microchip.com ). 2: some registers and associated bits described in this section may not be available on all devices. refer to section 4.0 memory organization in this data sheet for device-specific register and bit information. dma peripheral data memory sram (see figure 4-12 ) arbiter downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 130 ? 2013-2014 microchip technology inc. in addition, dma transfers can be triggered by timers as well as external interrupts. each dma channel is unidirectional. two dma channels must be allocated to read and write to a peripheral. if more than one channel receives a request to transfer data, a simple fixed priority scheme, based on channel number, dictates which channel completes the transfer and which channel, or channels, are left pending. each dma channel moves a block of data, after which, it generates an interrupt to the cpu to indicate that the block is available for processing. the dma controller provides these functional capabilities: four dma channels register indirect with post-increment addressing mode register indirect without post-increment addressing mode peripheral indirect addressing mode (peripheral generates destination address) cpu interrupt after half or full block transfer complete byte or word transfers fixed priority channel arbitration manual (software) or automatic (peripheral dma requests) transfer initiation one-shot or auto-repeat block transfer modes ping-pong mode (automatic switch between two sram start addresses after each block transfer complete) dma request for each channel can be selected from any supported interrupt source debug support features the peripherals that can utilize dma are listed in table 8-1 . table 8-1: dma channel to pe ripheral associations peripheral to dma association dmaxreq register irqsel<7:0> bits dmaxpad register (values to read from peripheral) dmaxpad register (values to write to peripheral) int0 C external interrupt 0 00000000 ic1 C input capture 1 00000001 0x0144 (ic1buf) ic2 C input capture 2 00000101 0x014c (ic2buf) ic3 C input capture 3 00100101 0x0154 (ic3buf) ic4 C input capture 4 00100110 0x015c (ic4buf) oc1 C output compare 1 00000010 0x0906 (oc1r) 0x0904 (oc1rs) oc2 C output compare 2 00000110 0x0910 (oc2r) 0x090e (oc2rs) oc3 C output compare 3 00011001 0x091a (oc3r) 0x0918 (oc3rs) oc4 C output compare 4 00011010 0x0924 (oc4r) 0x0922 (oc4rs) tmr2 C timer2 00000111 tmr3 C timer3 00001000 tmr4 C timer4 00011011 tmr5 C timer5 00011100 spi1 transfer done 00001010 0x0248 (spi1buf) 0x0248 (spi1buf) spi2 transfer done 00100001 0x0268 (spi2buf) 0x0268 (spi2buf) spi3 transfer done 01011011 0x02a8(spi3buf) 0x02a8(spi3buf) uart1rx C uart1 receiver 00001011 0x0226 (u1rxreg) uart1tx C uart1 transmitter 00001100 0x0224 (u1txreg) uart2rx C uart2 receiver 00011110 0x0236 (u2rxreg) uart2tx C uart2 transmitter 00011111 0x0234 (u2txreg) uart3rx C uart3 receiver 01010010 0x0256(u3rxreg) uart3tx C uart3 transmitter 01010011 0x0254(u3txreg) uart4rx C uart4 receiver 01011000 0x02b6(u4rxreg) uart4tx C uart4 transmitter 01011001 0x02b4(u4txreg) downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 131 dspic33epxxxgm3xx/6xx/7xx figure 8-2: dma controller block diagram can1 C rx data ready 00100010 0x0440 (c1rxd) can1 C tx data request 01000110 0x0442 (c1txd) can2 C rx data ready 00110111 0x0540(c2rxd) can2 C tx data request 01000111 0x0542(c2txd) dci C codec transfer done 00111100 0x0290(rxbuf0) 0x0298(txbuf0) adc1 C adc1 convert done 00001101 0x0300 (adc1buf0) adc2 C adc2 convert done 00010101 0x0340(adc2buf0) pmp C pmp data move 00101101 0x0608(pmpdat1) 0x0608(pmpdat1) table 8-1: dma channel to peripheral associations (continued) peripheral to dma association dmaxreq register irqsel<7:0> bits dmaxpad register (values to read from peripheral) dmaxpad register (values to write to peripheral) cpu arbiter peripheral non-dma dma x-bus peripheral indirect address dma control dma controller dma cpu peripheral x-bus irq to dma and interrupt controller modules irq to dma and interrupt controller modules irq to dma and interrupt controller modules 0123 sram channels peripheral 1 dma ready cpu dma peripheral 3 dma ready cpu dma peripheral 2 dma ready cpu dma note: cpu and dma address buses are not shown for clarity. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 132 ? 2013-2014 microchip technology inc. 8.1 dma controller registers each dma controller channel x (where x = 0 through 3) contains the following registers: 16-bit dma channel x control register (dmaxcon) 16-bit dma channel x irq select register (dmaxreq) 32-bit dma channel x start address register a (dmaxstal/h) 32-bit dma channel x start address register b (dmaxstbl/h) 16-bit dma channel x peripheral address register (dmaxpad) 14-bit dma channel x transfer count register (dmaxcnt) additional status registers (dmapwc, dmarqc, dmapps, dmalca and dsadrl/h) are common to all dma controller channels. these status registers pro- vide information on write and request collisions, as well as on last address and channel access information. the interrupt flags (dmaxif) are located in an ifsx register in the interrupt controller. the corresponding interrupt enable control bits (dmaxie) are located in an iecx register in the interrupt controller and the corresponding interrupt priority control bits (dmaxip) are located in an ipcx register in the interrupt controller. register 8-1: dma x con: dma channel x control register r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 u-0 u-0 u-0 chen size dir half nullw bit 15 bit 8 u-0 u-0 r/w-0 r/w-0 u-0 u-0 r/w-0 r/w-0 amode1 amode0 m o d e 1m o d e 0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 chen: channel enable bit 1 = channel is enabled 0 = channel is disabled bit 14 size: data transfer size bit 1 =byte 0 =word bit 13 dir: transfer direction bit (source/destination bus select) 1 = reads from ram address, writes to peripheral address 0 = reads from peripheral address, writes to ram address bit 12 half: block transfer interrupt select bit 1 = initiates interrupt when half of the data has been moved 0 = initiates interrupt when all of the data has been moved bit 11 nullw: null data peripheral write mode select bit 1 = null data write to peripheral in addition to ram write (dir bit must also be clear) 0 = normal operation bit 10-6 unimplemented: read as 0 bit 5-4 amode<1:0>: dma channel addressing mode select bits 11 = reserved 10 = peripheral indirect mode 01 = register indirect without post-increment mode 00 = register indirect with post-increment mode bit 3-2 unimplemented: read as 0 bit 1-0 mode<1:0>: dma channel operating mode select bits 11 = one-shot, ping-pong modes are enabled (one block transfer from/to each dma buffer) 10 = continuous, ping-pong modes are enabled 01 = one-shot, ping-pong modes are disabled 00 = continuous, ping-pong modes are disabled downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 133 dspic33epxxxgm3xx/6xx/7xx register 8-2: dma x req: dma channel x irq select register r/s-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 force ( 1 ) bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 irqsel7 irqsel6 irqsel5 irqsel4 irqsel3 irqsel2 irqsel1 irqsel0 bit 7 bit 0 legend: s = settable bit r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 force: force dma transfer bit ( 1 ) 1 = forces a single dma transfer (manual mode) 0 = automatic dma transfer initiation by dma request bit 14-8 unimplemented: read as 0 bit 7-0 irqsel<7:0>: dma peripheral irq number select bits 01011011 = spi3 C transfer done 01011001 = uart4tx C uart4 transmitter 01011000 = uart4rx C uart4 receiver 01010011 = uart3tx C uart3 transmitter 01010010 = uart3rx C uart3 receiver 01000111 = can2 C tx data request 01000110 = can1 C tx data request 00111100 = dci C codec transfer done 00110111 = can2 C rx data ready 00101101 = pmp C pmp data move 00100110 = ic4 C input capture 4 00100101 = ic3 C input capture 3 00100010 = can1 C rx data ready 00100001 = spi2 C spi2 transfer done 00011111 = uart2tx C uart2 transmitter 00011110 = uart2rx C uart2 receiver 00011100 = tmr5 C timer5 00011011 = tmr4 C timer4 00011010 = oc4 C output compare 4 00011001 = oc3 C output compare 3 00010101 = adc2 C adc2 convert done 00001101 = adc1 C adc1 convert done 00001100 = uart1tx C uart1 transmitter 00001011 = uart1rx C uart1 receiver 00001010 = spi1 C spi1 transfer done 00001000 = tmr3 C timer3 00000111 = tmr2 C timer2 00000110 = oc2 C output compare 2 00000101 = ic2 C input capture 2 00000010 = oc1 C output compare 1 00000001 = ic1 C input capture 1 00000000 = int0 C external interrupt 0 note 1: the force bit cannot be cleared by user software. the force bit is cleared by har dware when the forced dma transfer is complete or the channel is disabled (chen = 0 ). downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 134 ? 2013-2014 microchip technology inc. register 8-3: dma x stah: dma channel x start address register a (high) u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 sta<23:16> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-8 unimplemented: read as 0 bit 7-0 sta<23:16>: dma primary start address bits (source or destination) register 8-4: dma x stal: dma channel x start address register a (low) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 sta<15:8> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 sta<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 sta<15:0>: dma primary start address bits (source or destination) downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 135 dspic33epxxxgm3xx/6xx/7xx register 8-5: dma x stbh: dma channel x start address register b (high) u-0 u-0 u-0 u-0 r/w-0 u-0 u-0 u-0 bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 stb<23:16> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-8 unimplemented: read as 0 bit 7-0 stb<23:16>: dma secondary start address bits (source or destination) register 8-6: dma x stbl: dma channel x start address register b (low) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 stb<15:8> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 stb<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 stb<15:0>: dma secondary start address bits (source or destination) downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 136 ? 2013-2014 microchip technology inc. register 8-7: dma x pad: dma channel x peripheral address register ( 1 ) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 pad<15:8> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 pad<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 pad<15:0>: dma peripheral address register bits note 1: if the channel is enabled (i.e., active), writes to this register may result in unpredictable behavior of the dma channel and should be avoided. register 8-8: dma x cnt: dma channel x transfer count register ( 1 ) u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 cnt<13:8> ( 2 ) bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 cnt<7:0> ( 2 ) bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-14 unimplemented: read as 0 bit 13-0 cnt<13:0>: dma transfer count register bits ( 2 ) note 1: if the channel is enabled (i.e., active), writes to this register may result in unpredictable behavior of the dma channel and should be avoided. 2: the number of dma transfers = cnt<13:0> + 1. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 137 dspic33epxxxgm3xx/6xx/7xx register 8-9: dsadrh: dma most re cent ram high address register u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 15 bit 8 r-0 r-0 r-0 r-0 r-0 r-0 r-0 r-0 dsadr<23:16> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-8 unimplemented: read as 0 bit 7-0 dsadr<23:16>: most recent dma address accessed by dma bits register 8-10: dsadrl: dma most recent ram low address register r-0 r-0 r-0 r-0 r-0 r-0 r-0 r-0 dsadr<15:8> bit 15 bit 8 r-0 r-0 r-0 r-0 r-0 r-0 r-0 r-0 dsadr<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 dsadr<15:0>: most recent dma address accessed by dma bits downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 138 ? 2013-2014 microchip technology inc. register 8-11: dmapwc: dma peripheral write collision status register u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 15 bit 8 u-0 u-0 u-0 u-0 r-0 r-0 r-0 r-0 pwcol3 pwcol2 pwcol1 pwcol0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-4 unimplemented: read as 0 bit 3 pwcol3: channel 3 peripheral write collision flag bit 1 = write collision is detected 0 = no write collision is detected bit 2 pwcol2: channel 2 peripheral write collision flag bit 1 = write collision is detected 0 = no write collision is detected bit 1 pwcol1: channel 1 peripheral write collision flag bit 1 = write collision is detected 0 = no write collision is detected bit 0 pwcol0: channel 0 peripheral write collision flag bit 1 = write collision is detected 0 = no write collision is detected downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 139 dspic33epxxxgm3xx/6xx/7xx register 8-12: dmarqc: dma request collision status register u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 15 bit 8 u-0 u-0 u-0 u-0 r-0 r-0 r-0 r-0 rqcol3 rqcol2 rqcol1 rqcol0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-4 unimplemented: read as 0 bit 3 rqcol3: channel 3 transfer request collision flag bit 1 = user force and interrupt-based request collision are detected 0 = no request collision is detected bit 2 rqcol2: channel 2 transfer request collision flag bit 1 = user force and interrupt-based request collision are detected 0 = no request collision is detected bit 1 rqcol1: channel 1 transfer request collision flag bit 1 = user force and interrupt-based request collision are detected 0 = no request collision is detected bit 0 rqcol0: channel 0 transfer request collision flag bit 1 = user force and interrupt-based request collision are detected 0 = no request collision is detected downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 140 ? 2013-2014 microchip technology inc. register 8-13: dmalca: dma last channel active status register u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 15 bit 8 u-0 u-0 u-0 u-0 r-1 r-1 r-1 r-1 lstch<3:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-4 unimplemented: read as 0 bit 3-0 lstch<3:0>: last dma controller channel active status bits 1111 = no dma transfer has occurred since system reset 1110 = reserved 0100 = reserved 0011 = last data transfer was handled by channel 3 0010 = last data transfer was handled by channel 2 0001 = last data transfer was handled by channel 1 0000 = last data transfer was handled by channel 0 downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 141 dspic33epxxxgm3xx/6xx/7xx register 8-14: dmapps: dma ping-pong status register u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 15 bit 8 u-0 u-0 u-0 u-0 r-0 r-0 r-0 r-0 ppst3 ppst2 ppst1 ppst0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-4 unimplemented: read as 0 bit 3 ppst3: channel 3 ping-pong mode status flag bit 1 = dma3stb register is selected 0 = dma3sta register is selected bit 2 ppst2: channel 2 ping-pong mode status flag bit 1 = dma2stb register is selected 0 = dma2sta register is selected bit 1 ppst1: channel 1 ping-pong mode status flag bit 1 = dma1stb register is selected 0 = dma1sta register is selected bit 0 ppst0: channel 0 ping-pong mode status flag bit 1 = dma0stb register is selected 0 = dma0sta register is selected downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 142 ? 2013-2014 microchip technology inc. notes: downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 143 dspic33epxxxgm3xx/6xx/7xx 9.0 oscillator configuration the dspic33epxxxgm3xx/6xx/7xx oscillator system provides: on-chip phase-locked loop (pll) to boost internal operating frequency on select internal and external oscillator sources on-the-fly clock switching between various clock sources doze mode for system power savings fail-safe clock monitor (fscm) that detects clock failure and permits safe application recovery or shutdown configuration bits for clock source selection a simplified diagram of the oscillator system is shown in figure 9-1 . figure 9-1: oscillator system diagram note 1: this data sheet summarizes the features of the dspic33epxxxgm3xx/6xx/7xx family of devices. it is not intended to be a comprehensive reference source. to complement the information in this data sheet, refer to the ?dspic33/pic24 fam- ily reference manual , oscillator (ds70580), which is available from the microchip web site ( www.microchip.com ). 2: some registers and associated bits described in this section may not be available on all devices. refer to section 4.0 memory organization in this data sheet for device-specific register and bit information. note 1: see figure 9-2 for pll and f vco details. 2: if the oscillator is used with xt or hs modes, an external parallel resistor with the value of 1 m ? must be connected. 3: the term, f p , refers to the clock source for all peripherals, while f cy refers to the clock source for the cpu. throughout this document, f cy and f p are used interchangeably, except in the case of doze mode. f p and f cy will be different when doze mode is used with a doze ratio of 1:2 or lower. xtpll, hspll, xt, hs, ec frcdiv<2:0> wdt, pwrt, frcdivn frcdiv16 ecpll, frcpll nosc<2:0> fnosc<2:0> reset frc oscillator doze<2:0> s3 s1 s2 s1/s3 s7 s6 frc lprc s0s5 16 clock switch s7 clock fail tun<5:0> pll (1) f cy (3) f osc frcdiv doze fscm poscclk frcclk f vco (1) osc2 osc1 primary oscillator poscmd<1:0> f p (3) n rosel rodiv<3:0> refclko poscclk rpn f osc reference clock generation s4 sosco sosci secondary oscillator sosc timer1 lprc oscillator 2 downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 144 ? 2013-2014 microchip technology inc. 9.1 cpu clocking system the dspic33epxxxgm3xx/6xx/7xx family of devices provides seven system clock options: fast rc (frc) oscillator frc oscillator with phase-locked loop (pll) frc oscillator with postscaler primary (xt, hs or ec) oscillator primary oscillator with pll low-power rc (lprc) oscillator secondary (lp) oscillator instruction execution speed or device operating frequency, f cy , is given by equation 9-1 . equation 9-1: device operating frequency figure 9-2 is a block diagram of the pll module. equation 9-2 provides the relationship between input frequency (f in ) and output frequency (f osc ). equation 9-3 provides the relationship between input frequency (f in ) and vco frequency (f sys ). figure 9-2: pll block diagram equation 9-2: f osc calculation equation 9-3: f vco calculation f cy = f osc /2 n1 m n2 pfd vco pllpre<4:0> plldiv<8:0> pllpost<1:0> 0.8 mhz < f plli (1) < 8.0 mhz 120 mh z < f sys (1) < 340 mh z f osc (1) ? 120 mhz @ +125c f in f plli f sys f osc note 1: this frequency range must be met at all times. f osc (1) ? 140 mhz @ +85c where: n 1 = pllpre <4:0> + 2 n 2 = 2 x ( pllpost< 1:0> + 1) m = plldiv <8:0> + 2 ( plldiv <8:0> + 2) ( pllpre <4:0> + 2) ? 2( pllpost <1:0> + 1) () f osc = f in ? = f in ? m n 1 ?? ? ? () ( plldiv <8:0> + 2) ( pllpre <4:0> + 2) () f sys = f in ? = f in ? m n 1 () downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 145 dspic33epxxxgm3xx/6xx/7xx table 9-1: configuration bit va lues for clock selection oscillator mode oscillator source poscmd<1:0> fnosc<2:0> see notes fast rc oscillator with divide-by-n (frcdivn) internal xx 111 1 , 2 fast rc oscillator with divide-by-16 (frcdiv16) internal xx 110 1 low-power rc oscillator (lprc) internal xx 101 1 secondary (timer1) oscillator (sosc) secondary xx 100 1 primary oscillator (hs) with pll (hspll) primary 10 011 primary oscillator (xt) with pll (xtpll) primary 01 011 primary oscillator (ec) with pll (ecpll) primary 00 011 1 primary oscillator (hs) primary 10 010 primary oscillator (xt) primary 01 010 primary oscillator (ec) primary 00 010 1 fast rc oscillator (frc) with divide-by-n and pll (frcpll) internal xx 001 1 fast rc oscillator (frc) internal xx 000 1 note 1: osc2 pin function is determined by the osciofnc configuration bit. 2: this is the default oscillator mode for an unprogrammed (erased) device. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 146 ? 2013-2014 microchip technology inc. register 9-1: osccon: os cillator control register ( 1 , 3 ) u-0 r-0 r-0 r-0 u-0 r/w-y r/w-y r/w-y cosc2 cosc1 cosc0 n o s c 2 ( 2 ) nosc1 ( 2 ) nosc0 ( 2 ) bit 15 bit 8 r/w-0 r/w-0 r-0 u-0 r/w-0 u-0 r/w-0 r/w-0 clklock iolock lock c f ( 5 ) lposcen oswen bit 7 bit 0 legend: y = value set from configuration bits on por r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 unimplemented: read as 0 bit 14-12 cosc<2:0>: current oscillator selection bits (read-only) 111 = fast rc oscillator (frc) with divide-by-n 110 = fast rc oscillator (frc) with divide-by-16 101 = low-power rc oscillator (lprc) 100 = secondary oscillator (sosc) ( 4 ) 011 = primary oscillator (ms, hs, ec) with pll 010 = primary oscillator (ms, hs, ec) 001 = fast rc oscillator (frc) divided by n and pll 000 = fast rc oscillator (frc) bit 11 unimplemented: read as 0 bit 10-8 nosc<2:0>: new oscillator selection bits ( 2 ) 111 = fast rc oscillator (frc) with divide-by-n 110 = fast rc oscillator (frc) with divide-by-16 101 = low-power rc oscillator (lprc) 100 = secondary oscillator (sosc) ( 4 ) 011 = primary oscillator (ms, hs, ec) with pll 010 = primary oscillator (ms, hs, ec) 001 = fast rc oscillator (frc) divided by n and pll 000 = fast rc oscillator (frc) bit 7 clklock: clock lock enable bit 1 = if fcksm0 = 1 , then clock and pll configurations are locked; if fcksm0 = 0 , then clock and pll configurations may be modified 0 = clock and pll selections are not locked, configurations may be modified bit 6 iolock: i/o lock enable bit 1 = i/o lock is active 0 = i/o lock is not active note 1: writes to this register require an unlock sequence. refer to the ?dspic33/pic24 family reference manual? , oscillator (ds70580), available from the microchip web site for details. 2: direct clock switches between any primary oscillator mode with pll and frcpll mode are not permitted. this applies to clock switches in either direction. in these instances, the application must switc h to frc mode as a transitional clock source between the two pll modes. 3: this register resets only on a power-on reset (por). 4: secondary oscillator (sosc) selection is valid on 64-pin and 100-pin devices, and defaults to frc/n on 44-pin devices. 5: only 0 should be written to the cf bit in order to clear it. if a 1 is written to cf, it will have the same effect as a detected clock failure, including an oscillator fail trap. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 147 dspic33epxxxgm3xx/6xx/7xx bit 5 lock: pll lock status bit (read-only) 1 = indicates that pll is in lock or pll start-up timer is satisfied 0 = indicates that pll is out of lock, start-up timer is in progress or pll is disabled bit 4 unimplemented: read as 0 bit 3 cf: clock fail detect bit (read/clear by application) ( 5 ) 1 = fscm has detected clock failure 0 = fscm has not detected clock failure bit 2 unimplemented: read as 0 bit 1 lposcen: secondary (lp) oscillator enable bit 1 = enables secondary oscillator (sosc) 0 = disables secondary oscillator bit 0 oswen: oscillator switch enable bit 1 = requests oscillator switch to selection specified by the nosc<2:0> b its 0 = oscillator switch is complete register 9-1: osccon: os cillator control register ( 1 , 3 ) (continued) note 1: writes to this register require an unlock sequence. refer to the ?dspic33/pic24 family reference manual? , oscillator (ds70580), available from the microchip web site for details. 2: direct clock switches between any primary oscillator mode with pll and frcpll mode are not permitted. this applies to clock switches in either direction. in these instances, the application must switc h to frc mode as a transitional clock source between the two pll modes. 3: this register resets only on a power-on reset (por). 4: secondary oscillator (sosc) selection is valid on 64-pin and 100-pin devices, and defaults to frc/n on 44-pin devices. 5: only 0 should be written to the cf bit in order to clear it. if a 1 is written to cf, it will have the same effect as a detected clock failure, including an oscillator fail trap. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 148 ? 2013-2014 microchip technology inc. register 9-2: clkdiv: clock divisor register ( 2 ) r/w-0 r/w-0 r/w-1 r/w-1 r/w-0 r/w-0 r/w-0 r/w-0 roi doze2 ( 3 ) doze1 ( 3 ) doze0 ( 3 ) dozen ( 1 , 4 ) frcdiv2 frcdiv1 frcdiv0 bit 15 bit 8 r/w-0 r/w-1 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 pllpost1 pllpost0 pllpre4 pllpre3 pllpre2 pllpre1 pllpre0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 roi: recover on interrupt bit 1 = interrupts will clear the dozen bit 0 = interrupts will have no effect on the dozen bit bit 14-12 doze<2:0>: processor clock reduction select bits ( 3 ) 111 = f cy divided by 128 110 = f cy divided by 64 101 = f cy divided by 32 100 = f cy divided by 16 011 = f cy divided by 8 (default) 010 = f cy divided by 4 001 = f cy divided by 2 000 = f cy divided by 1 bit 11 dozen: doze mode enable bit ( 1 , 4 ) 1 = doze<2:0> field specifies the ratio between the peripheral clocks and the processor clocks 0 = processor clock and peripheral clock ratio are forced to 1:1 bit 10-8 frcdiv<2:0>: internal fast rc oscillator postscaler bits 111 = frc divided by 256 110 = frc divided by 64 101 = frc divided by 32 100 = frc divided by 16 011 = frc divided by 8 010 = frc divided by 4 001 = frc divided by 2 000 = frc divided by 1 (default) bit 7-6 pllpost<1:0>: pll vco output divider select bits (also denoted as n2, pll postscaler) 11 = output divided by 8 10 = reserved 01 = output divided by 4 (default) 00 = output divided by 2 bit 5 unimplemented: read as 0 note 1: this bit is cleared when the roi bit is set and an interrupt occurs. 2: this register resets only on a power-on reset (por). 3: the doze<2:0> bits can only be written to when the dozen bit is clear. if dozen = 1 , any writes to doze<2:0> are ignored. 4: the dozen bit cannot be set if doze<2:0> = 000 . if doze<2:0> = 000 , any attempt by user software to set the dozen bit is ignored. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 149 dspic33epxxxgm3xx/6xx/7xx bit 4-0 pllpre<4:0>: pll phase detector input divider select bits (also denoted as n1, pll prescaler) 11111 = input divided by 33 00001 = input divided by 3 00000 = input divided by 2 (default) register 9-2: clkdiv: clock divisor register ( 2 ) (continued) note 1: this bit is cleared when the roi bit is set and an interrupt occurs. 2: this register resets only on a power-on reset (por). 3: the doze<2:0> bits can only be written to when the dozen bit is clear. if dozen = 1 , any writes to doze<2:0> are ignored. 4: the dozen bit cannot be set if doze<2:0> = 000 . if doze<2:0> = 000 , any attempt by user software to set the dozen bit is ignored. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 150 ? 2013-2014 microchip technology inc. register 9-3: pllfbd: pll feedback divisor register ( 1 ) u-0 u-0 u-0 u-0 u-0 u-0 u-0 r/w-0 p l l d i v < 8 > bit 15 bit 8 r/w-0 r/w-0 r/w-1 r/w-1 r/w-0 r/w-0 r/w-0 r/w-0 plldiv<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-9 unimplemented: read as 0 bit 8-0 plldiv<8:0>: pll feedback divisor bits (also denoted as m, pll multiplier) 111111111 = 513 000110000 = 50 (default) 000000010 = 4 000000001 = 3 000000000 = 2 note 1: this register is reset only on a power-on reset (por). downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 151 dspic33epxxxgm3xx/6xx/7xx register 9-4: osctun: frc oscillator tuning register ( 1 ) u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 15 bit 8 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 tun<5:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-6 unimplemented: read as 0 bit 5-0 tun<5:0>: frc oscillator tuning bits 111111 = center frequency C 0.047% 100001 = center frequency C 1.453% 100000 = center frequency C 1.5% (7.355 mhz) 011111 = center frequency + 1.5% (7.385 mhz) 011110 = center frequency + 1.453% 000001 = center frequency + 0.047% 000000 = center frequency (7.3728 mhz nominal) note 1: this register resets only on a power-on reset (por). downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 152 ? 2013-2014 microchip technology inc. register 9-5: refocon: reference oscillator control register r/w-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 roon rosslp rosel rodiv3 ( 1 ) rodiv2 ( 1 ) rodiv1 ( 1 ) rodiv0 ( 1 ) bit 15 bit 8 u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 roon: reference oscillator output enable bit 1 = reference oscillator output is enabled on the refclk pin ( 2 ) 0 = reference oscillator output is disabled bit 14 unimplemented: read as 0 bit 13 rosslp: reference oscillator run in sleep bit 1 = reference oscillator output continues to run in sleep 0 = reference oscillator output is disabled in sleep bit 12 rosel: reference oscillator source select bit 1 = oscillator crystal is used as the reference clock 0 = system clock is used as the reference clock bit 11-8 rodiv<3:0>: reference oscillator divider bits ( 1 ) 1111 = reference clock divided by 32,768 1110 = reference clock divided by 16,384 1101 = reference clock divided by 8,192 1100 = reference clock divided by 4,096 1011 = reference clock divided by 2,048 1010 = reference clock divided by 1,024 1001 = reference clock divided by 512 1000 = reference clock divided by 256 0111 = reference clock divided by 128 0110 = reference clock divided by 64 0101 = reference clock divided by 32 0100 = reference clock divided by 16 0011 = reference clock divided by 8 0010 = reference clock divided by 4 0001 = reference clock divided by 2 0000 = reference clock bit 7-0 unimplemented: read as 0 note 1: the reference oscillator output must be disabled (roon = 0 ) before writing to these bits. 2: this pin is remappable. see section 11.4 peripheral pin select (pps) for more information. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 153 dspic33epxxxgm3xx/6xx/7xx 10.0 power-saving features the dspic33epxxxgm3xx/6xx/7xx devices provide the ability to manage power consumption by selectively managing clocking to the cpu and the peripherals. in general, a lower clock frequency and a reduction in the number of peripherals being clocked constitutes lower consumed power. the dspic33epxxxgm3xx/6xx/7xx devices can manage power consumption in four ways: clock frequency instruction-based sleep and idle modes software-controlled doze mode selective peripheral control in software combinations of these methods can be used to selec- tively tailor an applications power consumption while still maintaining critical application features, such as timing-sensitive communications. 10.1 clock frequency and clock switching the dspic33epxxxgm3xx/6xx/7xx devices allow a wide range of clock frequencies to be selected under application control. if the system clock configuration is not locked, users can choose low-power or high- precision oscillators by simply changing the noscx bits (osccon<10:8>). the process of changing a system clock during operation, as well as limitations to the process, are discussed in more detail in section 9.0 oscillator configuration . 10.2 instruction-based power-saving modes the dspic33epxxxgm3xx/6xx/7xx devices have two special power-saving modes that are entered through the execution of a special pwrsav instruction. sleep mode stops clock operation and halts all code execution. idle mode halts the cpu and code execution, but allows peripheral modules to continue operation. the assembler syntax of the pwrsav instruction is shown in example 10-1 . sleep and idle modes can be exited as a result of an enabled interrupt, wdt time-out or a device reset. when the device exits these modes, it is said to wake-up. example 10-1: pwrsav instruction syntax note 1: this data sheet summarizes the features of the dspic33epxxxgm3xx/6xx/7xx family of devices. it is not intended to be a comprehensive reference source. to _complement the information in this data sheet, refer to the ?dspic33/pic24 family reference manual , watchdog timer and power-saving modes (ds70615), which is available from the microchip web site ( www.microchip.com ). 2: some registers and associated bits described in this section may not be available on all devices. refer to section 4.0 memory organization in this data sheet for device-specific register and bit information. note: sleep_mode and idle_mode are con- stants defined in the assembler include file for the selected device. pwrsav #sleep_mode ; put the device into sleep mode pwrsav #idle_mode ; put the device into idle mode downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 154 ? 2013-2014 microchip technology inc. 10.2.1 sleep mode the following occurs in sleep mode: the system clock source is shut down. if an on-chip oscillator is used, it is turned off. the device current consumption is reduced to a minimum, provided that no i/o pin is sourcing current the fail-safe clock monitor does not operate, since the system clock source is disabled the lprc clock continues to run in sleep mode if the wdt is enabled the wdt, if enabled, is automatically cleared prior to entering sleep mode some device features or peripherals can continue to operate. this includes items such as the input change notification (icn) on the i/o ports or peripherals that use an external clock input. any peripheral that requires the system clock source for its operation is disabled the device wakes up from sleep mode on any of the these events: any interrupt source that is individually enabled any form of device reset a wdt time-out on wake-up from sleep mode, the processor restarts with the same clock source that was active when sleep mode was entered. for optimal power savings, the internal regulator and the flash regulator can be configured to go into standby mode when sleep mode is entered by clearing the vregs (rcon<8>) and vregsf (rcon<11>) bits (default configuration). if the application requires a faster wake-up time, and can accept higher current requirements, the vregs (rcon<8>) and vregsf (rcon<11>) bits can be set to keep the internal regulator and the flash regulator active during sleep mode. 10.2.2 idle mode the following occurs in idle mode: the cpu stops executing instructions the wdt is automatically cleared the system clock source remains active. by default, all peripheral modules continue to operate normally from the system clock source, but can also be selectively disabled (see section 10.4 peripheral module disable ). if the wdt or fscm is enabled, the lprc also remains active. the device wakes from idle mode on any of these events: any interrupt that is individually enabled any device reset a wdt time-out on wake-up from idle mode, the clock is reapplied to the cpu and instruction execution will begin (2-4 clock cycles later), starting with the instruction following the pwrsav instruction or the first instruction in the interrupt service routine (isr). all peripherals also have the option to discontinue operation when idle mode is entered to allow for increased power savings. this option is selectable in the control register of each peripheral; for example, the tsidl bit in the timer1 control register (t1con<13>). 10.2.3 interrupts coincident with power save instructions any interrupt that coincides with the execution of a pwrsav instruction is held off until entry into sleep or idle mode has completed. the device then wakes up from sleep or idle mode. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 155 dspic33epxxxgm3xx/6xx/7xx 10.3 doze mode the preferred strategies for reducing power consumption are changing clock speed and invoking one of the power- saving modes. in some circumstances, this cannot be practical. for example, it may be necessary for an application to maintain uninterrupted synchronous communication, even while it is doing nothing else. reducing system clock speed can introduce communication errors, while using a power-saving mode can stop communications completely. doze mode is a simple and effective alternative method to reduce power consumption while the device is still executing code. in this mode, the system clock continues to operate from the same source and at the same speed. peripheral modules continue to be clocked at the same speed, while the cpu clock speed is reduced. synchronization between the two clock domains is maintained, allowing the peripherals to access the sfrs while the cpu executes code at a slower rate. doze mode is enabled by setting the dozen bit (clkdiv<11>). the ratio between peripheral and core clock speed is determined by the doze<2:0> bits (clkdiv<14:12>). there are eight possible configu- rations, from 1:1 to 1:128, with 1:1 being the default setting. programs can use doze mode to selectively reduce power consumption in event-driven applications. this allows clock-sensitive functions, such as synchronous communications, to continue without interruption while the cpu idles, waiting for something to invoke an interrupt routine. an automatic return to full-speed cpu operation on interrupts can be enabled by setting the roi bit (clkdiv<15>). by default, interrupt events have no effect on doze mode operation. for example, suppose the device is operating at 20 mips and the can module has been configured for 500 kbps based on this device operating speed. if the device is placed in doze mode with a clock frequency ratio of 1:4, the can module continues to communicate at the required bit rate of 500 kbps, but the cpu now starts executing instructions at a frequency of 5 mips. 10.4 peripheral module disable the peripheral module disable (pmd) registers provide a method to disable a peripheral module by stopping all clock sources supplied to that module. when a peripheral is disabled, using the appropriate pmd control bit, the peripheral is in a minimum power consumption state. the control and status registers associated with the peripheral are also disabled, so writes to those registers do not have effect and read values are invalid. a peripheral module is enabled only if both the associated bit in the pmd register is cleared and the peripheral is supported by the specific dspic ? dsc variant. if the peripheral is present in the device, it is enabled in the pmd register by default. note: if a pmd bit is set, the corresponding module is disabled after a delay of one instruction cycle. similarly, if a pmd bit is cleared, the corresponding module is enabled after a delay of one instruction cycle (assuming the module control regis- ters are already configured to enable module operation). downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 156 ? 2013-2014 microchip technology inc. register 10-1: pmd1: peripheral mo dule disable control register 1 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 t5md t4md t3md t2md t1md qei1md pwmmd dcimd bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 i2c1md u2md u1md spi2md spi1md c2md ( 1 ) c1md ( 1 ) ad1md bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 t5md: timer5 module disable bit 1 = timer5 module is disabled 0 = timer5 module is enabled bit 14 t4md: timer4 module disable bit 1 = timer4 module is disabled 0 = timer4 module is enabled bit 13 t3md: timer3 module disable bit 1 = timer3 module is disabled 0 = timer3 module is enabled bit 12 t2md: timer2 module disable bit 1 = timer2 module is disabled 0 = timer2 module is enabled bit 11 t1md: timer1 module disable bit 1 = timer1 module is disabled 0 = timer1 module is enabled bit 10 qei1md: qei1 module disable bit 1 = qei1 module is disabled 0 = qei1 module is enabled bit 9 pwmmd: pwm module disable bit 1 = pwm module is disabled 0 = pwm module is enabled bit 8 dcimd: dci module disable bit 1 = dci module is disabled 0 = dci module is enabled bit 7 i2c1md: i2c1 module disable bit 1 = i2c1 module is disabled 0 = i2c1 module is enabled bit 6 u2md: uart2 module disable bit 1 = uart2 module is disabled 0 = uart2 module is enabled bit 5 u1md: uart1 module disable bit 1 = uart1 module is disabled 0 = uart1 module is enabled note 1: these bits are available on dspic33epxxxgm6xx/7xx devices only. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 157 dspic33epxxxgm3xx/6xx/7xx bit 4 spi2md: spi2 module disable bit 1 = spi2 module is disabled 0 = spi2 module is enabled bit 3 spi1md: spi1 module disable bit 1 = spi1 module is disabled 0 = spi1 module is enabled bit 2 c2md: can2 module disable bit ( 1 ) 1 = can2 module is disabled 0 = can2 module is enabled bit 1 c1md: can1 module disable bit ( 1 ) 1 = can1 module is disabled 0 = can1 module is enabled bit 0 ad1md: adc1 module disable bit 1 = adc1 module is disabled 0 = adc1 module is enabled register 10-1: pmd1: peripheral module disable control register 1 (continued) note 1: these bits are available on dspic33epxxxgm6xx/7xx devices only. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 158 ? 2013-2014 microchip technology inc. register 10-2: pmd2: peripheral mo dule disable control register 2 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ic8md ic7md ic6md ic5md ic4md ic3md ic2md ic1md bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 oc8md oc7md oc6md oc5md oc4md oc3md oc2md oc1md bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-8 ic8md:ic1md: input capture x (x = 1-8) module disable bits 1 = input capture x module is disabled 0 = input capture x module is enabled bit 7-0 oc8md:oc1md: output compare x (x = 1-8) module disable bits 1 = output compare x module is disabled 0 = output compare x module is enabled downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 159 dspic33epxxxgm3xx/6xx/7xx register 10-3: pmd3: peripheral mo dule disable control register 3 r/w-0 r/w-0 r/w-0 r/w-0 u-0 r/w-0 r/w-0 r/w-0 t9md t8md t7md t6md cmpmd rtccmd (1) pmpmd bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 crcmd dacmd qei2md pwm2md u3md i2c3md i2c2md adc2md bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 t9md: timer9 module disable bit 1 = timer9 module is disabled 0 = timer9 module is enabled bit 13 t8md: timer8 module disable bit 1 = timer8 module is disabled 0 = timer8 module is enabled bit 14 t7md: timer7 module disable bit 1 = timer7 module is disabled 0 = timer7 module is enabled bit 12 t6md: timer6 module disable bit 1 = timer6 module is disabled 0 = timer6 module is enabled bit 11 unimplemented: read as 0 bit 10 cmpmd: comparator module disable bit 1 = comparator module is disabled 0 = comparator module is enabled bit 9 rtccmd: rtcc module disable bit (1) 1 = rtcc module is disabled 0 = rtcc module is enabled bit 8 pmpmd: pmp module disable bit 1 = pmp module is disabled 0 = pmp module is enabled bit 7 crcmd: crc module disable bit 1 = crc module is disabled 0 = crc module is enabled bit 6 dacmd: dac module disable bit 1 = dac module is disabled 0 = dac module is enabled bit 5 qei2md: qei2 module disable bit 1 = qei2 module is disabled 0 = qei2 module is enabled bit 4 pwm2md: pwm2 module disable bit 1 = pwm2 module is disabled 0 = pwm2 module is enabled note 1: the rtccmd bit is not available on 44-pin devices. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 160 ? 2013-2014 microchip technology inc. bit 3 u3md: uart3 module disable bit 1 = uart3 module is disabled 0 = uart3 module is enabled bit 2 i2c3md: i2c3 module disable bit 1 = i2c3 module is disabled 0 = i2c3 module is enabled bit 1 i2c2md: i2c2 module disable bit 1 = i2c2 module is disabled 0 = i2c2 module is enabled bit 0 adc2md: adc2 module disable bit 1 = adc2 module is disabled 0 = adc2 module is enabled register 10-3: pmd3: peripheral mo dule disable control register 3 note 1: the rtccmd bit is not available on 44-pin devices. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 161 dspic33epxxxgm3xx/6xx/7xx register 10-4: pmd4: peripheral mo dule disable control register 4 u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 15 bit 8 u-0 u-0 r/w-0 u-0 r/w-0 r/w-0 u-0 u-0 u 4 m d r e f o m dc t m u m d bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-6 unimplemented: read as 0 bit 5 u4md: uart4 module disable bit 1 = uart4 module is disabled 0 = uart4 module is enabled bit 4 unimplemented: read as 0 bit 3 refomd: reference clock module disable bit 1 = reference clock module is disabled 0 = reference clock module is enabled bit 2 ctmumd: ctmu module disable bit 1 = ctmu module is disabled 0 = ctmu module is enabled bit 1-0 unimplemented: read as 0 register 10-5: pmd6: peripheral mo dule disable control register 6 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 pwm6md pwm5md pwm4md pwm3md pwm2md pwm1md bit 15 bit 8 u-0 u-0 u-0 u-0 u-0 u-0 u-0 r/w-0 spi3md bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-14 unimplemented: read as 0 bit 13-8 pwm6md:pwm1md: pwmx (x = 1-6) module disable bit 1 = pwmx module is disabled 0 = pwmx module is enabled bit 7-1 unimplemented: read as 0 bit 0 spi3md: spi3 module disable bit 1 = spi3 module is disabled 0 = spi3 module is enabled downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 162 ? 2013-2014 microchip technology inc. register 10-6: pmd7: peripheral mo dule disable control register 7 u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 15 bit 8 u-0 u-0 u-0 r/w-0 r/w-0 u-0 u-0 u-0 dma0md ( 1 ) ptgmd dma1md ( 1 ) dma2md ( 1 ) dma3md ( 1 ) bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-5 unimplemented: read as 0 bit 4 dma0md: dma0 module disable bit ( 1 ) 1 = dma0 module is disabled 0 = dma0 module is enabled dma1md: dma1 module disable bit ( 1 ) 1 = dma1 module is disabled 0 = dma1 module is enabled dma2md: dma2 module disable bit ( 1 ) 1 = dma2 module is disabled 0 = dma2 module is enabled dma3md: dma3 module disable bit ( 1 ) 1 = dma3 module is disabled 0 = dma3 module is enabled bit 3 ptgmd: ptg module disable bit 1 = ptg module is disabled 0 = ptg module is enabled bit 2-0 unimplemented: read as 0 note 1: this single bit enables and disables all four dma channels. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 163 dspic33epxxxgm3xx/6xx/7xx 11.0 i/o ports many of the device pins are shared among the peripherals and the parallel i/o ports. all i/o input ports feature schmitt trigger inputs for improved noise immunity. 11.1 parallel i/o (pio) ports generally, a parallel i/o port that shares a pin with a peripheral is subservient to the peripheral. the peripherals output buffer data and control signals are provided to a pair of multiplexers. the multiplexers select whether the peripheral or the associated port has ownership of the output data and control signals of the i/o pin. the logic also prevents loop through, in which a ports digital output can drive the input of a peripheral that shares the same pin. figure 11-1 illustrates how ports are shared with other peripherals and the associated i/o pin to which they are connected. when a peripheral is enabled and the peripheral is actively driving an associated pin, the use of the pin as a general purpose output pin is disabled. the i/o pin can be read, but the output driver for the parallel port bit is disabled. if a peripheral is enabled, but the peripheral is not actively driving a pin, that pin can be driven by a port. all port pins have eight registers directly associated with their operation as digital i/o. the data direction register (trisx) determines whether the pin is an input or an output. if the data direction register bit is a 1 , then the pin is an input. all port pins are defined as inputs after a reset. reads from the latch (latx) read the latch. writes to the latch write the latch. reads from the port (portx) read the port pins, while writes to the port pins write the latch. any bit and its associated data and control registers that are not valid for a particular device are disabled. this means the corresponding latx and trisx registers, and the port pin are read as zeros. when a pin is shared with another peripheral or function that is defined as an input only, it is nevertheless regarded as a dedicated port because there is no other competing source of outputs. figure 11-1: block diagram of a typical shared port structure note 1: this data sheet summarizes the features of the dspic33epxxxgm3xx/6xx/7xx family of devices. it is not intended to be a comprehensive reference source. to complement the information in this data sheet, refer to the ?dspic33/pic24 fam- ily reference manual , i/o ports (ds70000598) which is available from the microchip web site ( www.microchip.com ). 2: some registers and associated bits described in this section may not be available on all devices. refer to section 4.0 memory organization in this data sheet for device-specific register and bit information. q d ck wr lat + tris latch i/o pin wr port data bus q d ck data latch read port read tris 10 1 0 wr tris peripheral output data output enable peripheral input data i/o peripheral module peripheral output enable pio module output multiplexers output data input data peripheral module enable read lat downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 164 ? 2013-2014 microchip technology inc. 11.1.1 open-drain configuration in addition to the portx, latx and trisx registers for data control, port pins can also be individually configured for either digital or open-drain output. this is controlled by the open-drain control x register, odcx, associated with each port. setting any of the bits configures the corresponding pin to act as an open-drain output. the open-drain feature allows the generation of outputs other than v dd by using external pull-up resistors. the maximum open-drain voltage allowed on any pin is the same as the maximum v ih specification for that particular pin. see the pin diagrams section for the available 5v tolerant pins and table 33-10 for the maximum v ih specification for each pin. 11.2 configuring analog and digital port pins the anselx registers control the operation of the analog port pins. the port pins that are to function as analog inputs or outputs must have their corresponding anselx and trisx bits set. in order to use port pins for i/o functionality with digital modules, such as timers, uarts, etc., the corresponding anselx bit must be cleared. the anselx register has a default value of 0xffff; therefore, all pins that share analog functions are analog (not digital) by default. pins with analog functions affected by the anselx registers are listed with a buffer type of analog in the pinout i/o descriptions (see table 1-1 in section 1.0 device overview ). if the trisx bit is cleared (output) while the anselx bit is set, the digital output level (v oh or v ol ) is converted by an analog peripheral, such as the adcx module or comparator module. when the portx register is read, all pins configured as analog input channels are read as cleared (a low level). pins configured as digital inputs do not convert an analog input. analog levels on any pin defined as a digital input (including the anx pins) can cause the input buffer to consume current that exceeds the device specifications. 11.2.1 i/o port write/read timing one instruction cycle is required between a port direction change or port write operation and a read operation of the same port. typically this instruction would be a nop , as shown in example 11-1 . 11.3 input change notification (icn) the input change notification function of the i/o ports allows devices to generate interrupt requests to the processor in response to a change-of-state (cos) on selected input pins. this feature can detect input change-of-states (cos), even in sleep mode when the clocks are disabled. every i/o port pin can be selected (enabled) for generating an interrupt request on a change-of-state. three control registers are associated with the icn functionality of each i/o port. the cnenx registers contain the icn interrupt enable control bits for each of the input pins. setting any of these bits enables an icn interrupt for the corresponding pins. each i/o pin also has a weak pull-up and a weak pull- down connected to it. the pull-ups and pull-downs act as a current source or sink source connected to the pin, and eliminate the need for external resistors when pushbutton or keypad devices are connected. the pull-ups and pull-downs are enabled separately using the cnpux and the cnpdx registers, which contain the control bits for each of the pins. setting any of the control bits enables the weak pull-ups and/or pull-downs for the corresponding pins. example 11-1: portb write/read example note: pull-ups and pull-downs on input change notification pins should always be dis- abled when the port pin is configured as a digital output. mov 0xff00, w0 ; configure portb<15:8> ; as inputs mov w0, trisb ; and portb<7:0> ; as outputs nop ; delay 1 cycle btss portb, #13 ; next instruction downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 165 dspic33epxxxgm3xx/6xx/7xx 11.4 peripheral pin select (pps) a major challenge in general purpose devices is provid- ing the largest possible set of peripheral features while minimizing the conflict of features on i/o pins. the chal- lenge is even greater on low pin count devices. in an application where more than one peripheral needs to be assigned to a single pin, inconvenient work arounds in application code or a complete redesign may be the only option. peripheral pin select configuration provides an alternative to these choices by enabling peripheral set selection and their placement on a wide range of i/o pins. by increasing the pinout options available on a particular device, users can better tailor the device to their entire application, rather than trimming the application to fit the device. the peripheral pin select configuration feature oper- ates over a fixed subset of digital i/o pins. users may independently map the input and/or output of most dig- ital peripherals to any one of these i/o pins. hardware safeguards are included that prevent accidental or spurious changes to the peripheral mapping once it has been established. 11.4.1 available pins the number of available pins is dependent on the particular device and its pin count. pins that support the peripheral pin select feature include the designation, rpn or rpin, in their full pin designation, where n is the remappable pin number. rp is used to designate pins that support both remappable input and output functions, while rpi indicates pins that support remappable input functions only. 11.4.2 available peripherals the peripherals managed by the peripheral pin select are all digital only peripherals. these include general serial communications (uart and spi), general pur- pose timer clock inputs, timer-related peripherals (input capture and output compare) and interrupt-on-change inputs. in comparison, some digital only peripheral modules are never included in the peripheral pin select feature. this is because the peripherals function requires special i/o circuitry on a specific port and cannot be easily con- nected to multiple pins. these modules include i 2 c? and the pwm. a similar requirement excludes all modules with analog inputs, such as the a/d converter. a key difference between remappable and non- remappable peripherals is that remappable peripherals are not associated with a default i/o pin. the peripheral must always be assigned to a specific i/o pin before it can be used. in contrast, non-remappable peripherals are always available on a default pin, assuming that the peripheral is active and not conflicting with another peripheral. when a remappable peripheral is active on a given i/o pin, it takes priority over all other digital i/o and digital communication peripherals associated with the pin. priority is given regardless of the type of peripheral that is mapped. remappable peripherals never take priority over any analog functions associated with the pin. 11.4.3 controlling peripheral pin select peripheral pin select features are controlled through two sets of sfrs: one to map peripheral inputs and one to map outputs. because they are separately con- trolled, a particular peripherals input and output (if the peripheral has both) can be placed on any selectable function pin without constraint. the association of a peripheral to a peripheral-selectable pin is handled in two different ways, depending on whether an input or output is being mapped. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 166 ? 2013-2014 microchip technology inc. 11.4.4 input mapping the inputs of the peripheral pin select options are mapped on the basis of the peripheral. that is, a control register associated with a peripheral dictates the pin it will be mapped to. the rpinrx registers are used to configure peripheral input mapping (see register 11-1 through register 11-29 ). each register contains sets of 7-bit fields, with each set associated with one of the remappable peripherals. programming a given periph- erals bit field with an appropriate 7-bit value maps the rpn pin with the corresponding value to that peripheral. for any given device, the valid range of values for any bit field corresponds to the maximum number of peripheral pin selections supported by the device. for example, figure 11-2 illustrates remappable pin selection for the u1rx input. figure 11-2: remappable input for u1rx 11.4.4.1 virtual connections dspic33epxxxgm3xx/6xx/7xx devices support virtual (internal) connections to the output of the op amp/comparator module (see figure 26-1 in section 26.0 op amp/comparator module ) and the ptg module (see section 25.0 peripheral trigger generator (ptg) module ). in addition, dspic33epxxxgm3xx/6xx/7xx devices support virtual connections to the filtered qeix module inputs: findx1, fhome1, findx2 and fhome2 (see figure 17-1 in section 17.0 quadrature encoder interface (qei) module ). virtual connections provide a simple way of inter- peripheral connection without utilizing a physical pin. for example, by setting the flt1r<6:0> bits of the rpinr12 register to the value of b0000001 , the output of the analog comparator, c1out, will be connected to the pwm fault 1 input, which allows the analog comparator to trigger pwm faults without the use of an actual physical pin on the device. virtual connection to the qeix module allows peripherals to be connected to the qeix digital filter input. to utilize this filter, the qeix module must be enabled and its inputs must be connected to a physical rpn pin. example 11-2 illustrates how the input capture module can be connected to the qeix digital filter. example 11-2: connecting ic1 to the home1 qei1 digital filter input on pin 43 rp0 rp1 rp3 0 12 u1rx input u1rxr<6:0> to peripheral rpn n note: for input only, peripheral pin select func- tionality does not have priority over trisx settings. therefore, when configuring an rpn pin for input, the corresponding bit in the trisx register must also be configured for input (set to 1 ). rpinr15 = 0x2500; /* connect the qei1 home1 input to rp37 (pin 43) */ rpinr7 = 0x009; /* connect the ic1 input to the digital filter on the fhome1 input */ qei1ioc = 0x4000; /* enable the qei digital filter */ qei1con = 0x8000; /* enable the qei module */ downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 167 dspic33epxxxgm3xx/6xx/7xx table 11-1: selectable input sources (maps input to function) input name ( 1 ) function name register configuration bits external interrupt 1 int1 rpinr0 int1r<6:0> external interrupt 2 int2 rpinr1 int2r<6:0> timer2 external clock t2ck rpinr3 t2ckr<6:0> input capture 1 ic1 rpinr7 ic1r<6:0> input capture 2 ic2 rpinr7 ic2r<6:0> input capture 3 ic3 rpinr8 ic3r<6:0> input capture 4 ic4 rpinr8 ic4r<6:0> input capture 5 ic5 rpinr9 ic5r<6:0> input capture 6 ic6 rpinr9 ic6r<6:0> input capture 7 ic7 rpinr10 ic7r<6:0> input capture 8 ic8 rpinr10 ic8r<6:0> output compare fault a ocfa rpinr11 ocfar<6:0> pwm fault 1 flt1 rpinr12 flt1r<6:0> pwm fault 2 flt2 rpinr12 flt2r<6:0> qei1 phase a qea1 rpinr14 qea1r<6:0> qei1 phase b qeb1 rpinr14 qeb1r<6:0> qei1 index indx1 rpinr 15 indx1r<6:0> qei1 home home1 rpinr15 hom1r<6:0> qei2 phase a qea2 rpinr16 qea2r<6:0> qei2 phase b qeb2 rpinr16 qeb2r<6:0> qei2 index indx2 rpinr17 indx2r<6:0> qei2 home home2 rpinr17 hom2r<6:0> uart1 receive u1rx rpinr18 u1rxr<6:0> uart2 receive u2rx rpinr19 u2rxr<6:0> spi2 data input sdi2 rpinr22 sdi2r<6:0> spi2 clock input sck2 rpinr22 sck2r<6:0> spi2 slave select ss2 rpinr23 ss2r<6:0> dci data input csdi rpinr24 csdir>6:0> dci clock input csck rpinr24 csckr<6:0> dci frame synchronization input cofs rpinr25 cofsr<6:0> can1 receive ( 2 ) c1rx rpinr26 c1rxr<6:0> can2 receive ( 2 ) c2rx rpinr26 c2rxr<6:0> uart3 receive u3rx rpinr27 u3rxr<6:0> uart3 clear-to-send u3cts rpinr27 u3ctsr<6:0> uart4 receive u4rx rpinr28 u4rxr<6:0> uart4 clear-to-send u4cts rpinr28 u4ctsr<6:0> spi3 data input sdi3 rpinr29 sdi3r<6:0> spi3 clock input sck3 rpinr29 sck3r<6:0> spi3 slave select ss3 rpinr 30 ss3r<6:0> note 1: unless otherwise noted, all inputs use the schmitt trigger input buffers. 2: this input is available on dspic33epxxxgm6xx/7xx devices only. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 168 ? 2013-2014 microchip technology inc. pwm sync input 1 synci1 rpinr37 synci1r<6:0> pwm dead-time compensation 1 dtcmp1 rpinr38 dtcmp1r<6:0> pwm dead-time compensation 2 dtcmp2 rpinr39 dtcmp2r<6:0> pwm dead-time compensation 3 dtcmp3 rpinr39 dtcmp3r<6:0> pwm dead-time compensation 4 dtcmp4 rpinr40 dtcmp4r<6:0> pwm dead-time compensation 5 dtcmp5 rpinr40 dtcmp5r<6:0> pwm dead-time compensation 6 dtcmp6 rpinr41 dtcmp6r<6:0> table 11-1: selectable input sources (maps input to function) (continued) input name ( 1 ) function name register configuration bits note 1: unless otherwise noted, all inputs use the schmitt trigger input buffers. 2: this input is available on dspic33epxxxgm6xx/7xx devices only. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 169 dspic33epxxxgm3xx/6xx/7xx table 11-2: input pin selection for selectable input sources peripheral pin select input register value input/ output pin assignment peripheral pin select input register value input/ output pin assignment 000 0000 iv ss 010 1100 ir p i 4 4 000 0001 ic m p 1 ( 1 ) 010 1101 ir p i 4 5 000 0010 ic m p 2 ( 1 ) 010 1110 ir p i 4 6 000 0011 ic m p 3 ( 1 ) 010 1111 ir p i 4 7 000 0100 ic m p 4 ( 1 ) 011 0000 i/o rp48 000 0101 011 0001 i/o rp49 000 0110 ip t g o 3 0 ( 1 ) 011 0010 ir p i 5 0 000 0111 ip t g o 3 1 ( 1 ) 011 0011 ir p i 5 1 000 1000 i indx1 ( 1 ) 011 0100 ir p i 5 2 000 1001 ih o m e 1 ( 1 ) 011 0101 ir p i 5 3 000 1010 i indx2 ( 1 ) 011 0110 i/o rp54 000 1011 ih o m e 2 ( 1 ) 011 0111 i/o rp55 000 1100 ic m p 5 ( 1 ) 011 1000 i/o rp56 000 1101 011 1001 i/o rp57 000 1110 011 1010 ir p i 5 8 000 1111 011 1011 001 0000 ir p i 1 6 011 1100 ir p i 6 0 001 0001 ir p i 1 7 011 1101 ir p i 6 1 001 0010 ir p i 1 8 011 1110 001 0011 ir p i 1 9 011 1111 ir p i 6 3 001 0100 i/o rp20 100 0000 001 0101 100 0001 001 0110 100 0010 001 0111 100 0011 001 1000 ir p i 2 4 100 0100 001 1001 ir p i 2 5 100 0101 i/o rp69 001 1010 100 0110 i/o rp70 001 1011 ir p i 2 7 100 0111 001 1100 ir p i 2 8 100 1000 ir p i 7 2 001 1101 100 1001 001 1110 100 1010 001 1111 100 1011 010 0000 ir p i 3 2 100 1100 ir p i 7 6 010 0001 ir p i 3 3 100 1101 ir p i 7 7 010 0010 ir p i 3 4 100 1110 010 0011 i/o rp35 100 1111 010 0100 i/o rp36 101 0000 ir p i 8 0 010 0101 i/o rp37 101 0001 i/o rp81 010 0110 i/o rp38 101 0010 010 0111 i/o rp39 101 0011 010 1000 i/o rp40 101 0100 legend: shaded rows indicate pps input register values that are unimplemented. note 1: see section 11.4.4.1 virtual connections for more information on selecting this pin assignment. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 170 ? 2013-2014 microchip technology inc. 010 1001 i/o rp41 101 0101 010 1010 i/o rp42 101 0110 010 1011 i/o rp43 101 0111 101 1000 110 1100 101 1001 110 1101 101 1010 110 1110 101 1011 110 1111 101 1100 111 0000 ir p i 1 1 2 101 1101 111 0001 i/o rp113 101 1110 ir p i 9 4 111 0010 101 1111 ir p i 9 5 111 0011 110 0000 ir p i 9 6 111 0100 110 0001 i/o rp97 111 0101 110 0010 111 0110 i/o rp118 110 0011 111 0111 ir p i 1 1 9 110 0100 111 1000 i/o rp120 110 0101 111 1001 ir p i 1 2 1 110 0110 111 1010 110 0111 111 1011 110 1000 111 1100 ir p i 1 2 4 110 1001 111 1101 i/o rp125 110 1010 111 1110 i/o rp126 110 1011 111 1111 i/o rp127 table 11-2: input pin selection for selectable input sources (continued) peripheral pin select input register value input/ output pin assignment peripheral pin select input register value input/ output pin assignment legend: shaded rows indicate pps input register values that are unimplemented. note 1: see section 11.4.4.1 virtual connections for more information on selecting this pin assignment. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 171 dspic33epxxxgm3xx/6xx/7xx 11.4.5 output mapping in contrast to inputs, the outputs of the peripheral pin select options are mapped on the basis of the pin. in this case, a control register associated with a particular pin dictates the peripheral output to be mapped. the rporx registers are used to control output mapping. like the rpinrx registers, each register contains sets of 6-bit fields, with each set associated with one rpn pin (see register 11-30 through register 11-42 ). the value of the bit field corresponds to one of the periph- erals and that peripherals output is mapped to the pin (see table 11-3 and figure 11-3 ). a null output is associated with the output register reset value of 0 . this is done to ensure that remap- pable outputs remain disconnected from all output pins by default. figure 11-3: multiplexing remappable output for rpn 11.4.5.1 mapping limitations the control schema of the peripheral select pins is not limited to a small range of fixed peripheral configura- tions. there are no mutual or hardware-enforced lockouts between any of the peripheral mapping sfrs. literally any combination of peripheral mappings across any or all of the rpn pins is possible. this includes both many-to-one and one-to-many mappings of peripheral inputs and outputs to pins. while such mappings may be technically possible from a configu- ration point of view, they may not be supportable from an electrical point of view. rpnr<5:0> 049 1 default u1tx output sdo2 output 2 refclko output 48 qei1ccmp output output data rpn downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 172 ? 2013-2014 microchip technology inc. table 11-3: output selection for remappable pins (rpn) function rpnr<5:0> output name default port 000000 rpn tied to default pin u1tx 000001 rpn tied to uart1 transmit u2tx 000011 rpn tied to uart2 transmit sdo2 001000 rpn tied to spi2 data output sck2 001001 rpn tied to spi2 clock output ss2 001010 rpn tied to spi2 slave select csdo 001011 rpn tied to dci data output csck 001100 rpn tied to dci clock output cofs 001101 rpn tied to dci frame sync c1tx 001110 rpn tied to can1 transmit c2tx 001111 rpn tied to can2 transmit oc1 010000 rpn tied to output compare 1 output oc2 010001 rpn tied to output compare 2 output oc3 010010 rpn tied to output compare 3 output oc4 010011 rpn tied to output compare 4 output oc5 010100 rpn tied to output compare 5 output oc6 010101 rpn tied to output compare 6 output oc7 010110 rpn tied to output compare 7 output oc8 010111 rpn tied to output compare 8 output c1out 011000 rpn tied to comparator output 1 c2out 011001 rpn tied to comparator output 2 c3out 011010 rpn tied to comparator output 3 u3tx 011011 rpn tied to uart3 transmit u3rts 011100 rpn tied to uart3 ready-to-send u4tx 011101 rpn tied to uart4 transmit u4rts 011110 rpn tied to uart4 ready-to-send sdo3 011111 rpn tied to spi3 slave output sck3 100000 rpn tied to spi3 clock output ss3 100001 rpn tied to spi3 slave select synco1 101101 rpn tied to pwm primary time base sync output synco2 101110 rpn tied to pwm secondary time base sync output qei1ccmp 101111 rpn tied to qei1 counter comparator output qei2ccmp 110000 rpn tied to qei2 counter comparator output refclko 110001 rpn tied to reference clock output c4out 110010 rpn tied to comparator output 4 c5out 110011 rpn tied to comparator output 5 downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 173 dspic33epxxxgm3xx/6xx/7xx 11.5 high-voltage detect the dspic33epxxxgm3xx/6xx/7xx devices contain high-voltage detection (hvd) which monitors the v cap voltage. the hvd is used to monitor the v cap supply voltage to ensure that an external connection does not raise the value above a safe level (~2.4v). if high core voltage is detected, all i/os are disabled and put in a tri-state condition. the device remains in this i/o tri- state condition as long as the high-voltage condition is present. 11.6 i/o helpful tips 1. in some cases, certain pins, as defined in table 33-10 under injection current, have inter- nal protection diodes to v dd and v ss . the term, injection current, is also referred to as clamp current. on designated pins with sufficient exter- nal current-limiting precautions by the user, i/o pin input voltages are allowed to be greater or less than the data sheet absolute maximum rat- ings, with respect to the v ss and v dd supplies. note that when the user application forward biases either of the high or low side internal input clamp diodes, that the resulting current being injected into the device that is clamped internally by the v dd and v ss power rails, may affect the adc accuracy by four to six counts. 2. i/o pins that are shared with any analog input pin (i.e., anx) are always analog pins by default after any reset. consequently, configuring a pin as an analog input pin automatically disables the digital input pin buffer and any attempt to read the digital input level by reading portx or latx will always return a 0 , regardless of the digital logic level on the pin. to use a pin as a digital i/o pin on a shared anx pin, the user application needs to configure the analog pin configuration registers in the i/o ports module (i.e., anselx) by setting the appropriate bit that corresponds to that i/o port pin to a 0 . 3. most i/o pins have multiple functions. referring to the device pin diagrams in this data sheet, the priorities of the functions allocated to any pins are indicated by reading the pin name from left- to-right. the left most function name takes precedence over any function to its right in the naming convention. for example: an16/t2ck/ t7ck/rc1. this indicates that an16 is the high- est priority in this example and will supersede all other functions to its right in the list. those other functions to its right, even if enabled, would not work as long as any other function to its left was enabled. this rule applies to all of the functions listed for a given pin. 4. each pin has an internal weak pull-up resistor and pull-down resistor that can be configured using the cnpux and cnpdx registers, respec- tively. these resistors eliminate the need for external resistors in certain applications. the internal pull-up is up to ~(v dd C 0.8), not v dd . this value is still above the minimum v ih of cmos and ttl devices. 5. when driving leds directly, the i/o pin can source or sink more current than what is specified in the v oh /i oh and v ol /i ol dc charac- teristic specifications. the respective i oh and i ol current rating only applies to maintaining the corresponding output at or above the v oh and at or below the v ol levels. however, for leds, unlike digital inputs of an externally connected device, they are not governed by the same min- imum v ih /v il levels. an i/o pin output can safely sink or source any current less than that listed in the absolute maximum rating section of this data sheet. for example: v oh = 2.4v @ i oh = -8 ma and v dd = 3.3v the maximum output current sourced by any 8 ma i/o pin = 12 ma. led source current < 12 ma is technically permitted. refer to the v oh /i oh graphs in section 33.0 electrical characteristics for additional information. note: although it is not possible to use a digital input pin when its analog function is enabled, it is possible to use the digital i/o output function, trisx = 0x0, while the analog function is also enabled. however, this is not recommended, particularly if the analog input is connected to an external analog voltage source, which would create signal contention between the analog signal and the output pin driver. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 174 ? 2013-2014 microchip technology inc. 6. the peripheral pin select (pps) pin mapping rules are as follows: a) only one output function can be active on a given pin at any time, regardless if it is a dedicated or remappable function (one pin, one output). b) it is possible to assign a remappable output function to multiple pins and externally short or tie them together for increased current drive. c) if any dedicated output function is enabled on a pin, it will take precedence over any remappable output function. d) if any dedicated digital (input or output) func- tion is enabled on a pin, any number of input remappable functions can be mapped to the same pin. e) if any dedicated analog function(s) are enabled on a given pin, digital input(s) of any kind will all be disabled, although a single dig- ital output, at the users cautionary discretion, can be enabled and active as long as there is no signal contention with an external analog input signal. for example, it is possible for the adcx to convert the digital output logic level or to toggle a digital output on a comparator or adcx input provided there is no external analog input, such as for a built-in self-test. f) any number of input remappable functions can be mapped to the same pin(s) at the same time, including to any pin with a single output from either a dedicated or remappable output. g) the tris registers control only the digital i/o output buffer. any other dedicated or remap- pable active output will automatically override the tris setting. the tris register does not control the digital logic input buffer. remap- pable digital inputs do not automatically override tris settings, which means that the tris bit must be set to input for pins with only remappable input function(s) assigned. h) all analog pins are enabled by default after any reset and the corresponding digital input buffer on the pin is disabled. only the analog pin select registers control the digital input buffer, not the tris register. the user must disable the analog function on a pin using the analog pin select registers in order to use any digital input(s) on a corresponding pin, no exceptions. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 175 dspic33epxxxgm3xx/6xx/7xx 11.7 peripheral pin select registers register 11-1: rpinr0: peripheral pin select input register 0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 i n t 1 r < 6 : 0 > bit 15 bit 8 u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 unimplemented: read as 0 bit 14-8 int1r<6:0>: assign external interrupt 1 (int1) to the corresponding rpn pin bits (see table 11-2 for input pin selection numbers) 1111100 = input tied to rpi124 0000001 = input tied to cmp1 0000000 = input tied to v ss bit 7-0 unimplemented: read as 0 downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 176 ? 2013-2014 microchip technology inc. register 11-2: rpinr1: peripheral pin select input register 1 u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 15 bit 8 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 i n t 2 r < 6 : 0 > bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-7 unimplemented: read as 0 bit 6-0 int2r<6:0>: assign external interrupt 2 (int2) to the corresponding rpn pin bits (see table 11-2 for input pin selection numbers) 1111100 = input tied to rpi124 0000001 = input tied to cmp1 0000000 = input tied to v ss downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 177 dspic33epxxxgm3xx/6xx/7xx register 11-3: rpinr3: peripheral pin select input register 3 u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 15 bit 8 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 t 2 c k r < 6 : 0 > bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-7 unimplemented: read as 0 bit 6-0 t2ckr<6:0>: assign timer2 external clock (t2ck) to the corresponding rpn pin bits (see table 11-2 for input pin selection numbers) 1111100 = input tied to rpi124 0000001 = input tied to cmp1 0000000 = input tied to v ss downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 178 ? 2013-2014 microchip technology inc. register 11-4: rpinr7: peripheral pin select input register 7 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ic2r<6:0> bit 15 bit 8 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ic1r<6:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 unimplemented: read as 0 bit 14-8 ic2r<6:0>: assign input capture 2 (ic2) to the corresponding rpn pin bits (see table 11-2 for input pin selection numbers) 1111100 = input tied to rpi124 0000001 = input tied to cmp1 0000000 = input tied to v ss bit 7 unimplemented: read as 0 bit 6-0 ic1r<6:0>: assign input capture 1 (ic1) to the corresponding rpn pin bits (see table 11-2 for input pin selection numbers) 1111100 = input tied to rpi124 0000001 = input tied to cmp1 0000000 = input tied to v ss downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 179 dspic33epxxxgm3xx/6xx/7xx register 11-5: rpinr8: peripheral pin select input register 8 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ic4r<6:0> bit 15 bit 8 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ic3r<6:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 unimplemented: read as 0 bit 14-8 ic4r<6:0>: assign input capture 4 (ic4) to the corresponding rpn pin bits (see table 11-2 for input pin selection numbers) 1111100 = input tied to rpi124 0000001 = input tied to cmp1 0000000 = input tied to v ss bit 7 unimplemented: read as 0 bit 6-0 ic3r<6:0>: assign input capture 3 (ic3) to the corresponding rpn pin bits (see table 11-2 for input pin selection numbers) 1111100 = input tied to rpi124 0000001 = input tied to cmp1 0000000 = input tied to v ss downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 180 ? 2013-2014 microchip technology inc. register 11-6: rpinr9: peripheral pin select input register 9 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ic6r<6:0> bit 15 bit 8 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ic5r<6:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 unimplemented: read as 0 bit 14-8 ic6r<6:0>: assign input capture 6 (ic6) to the corresponding rpn pin bits (see table 11-2 for input pin selection numbers) 1111100 = input tied to rpi124 0000001 = input tied to cmp1 0000000 = input tied to v ss bit 7 unimplemented: read as 0 bit 6-0 ic5r<6:0>: assign input capture 5 (ic5) to the corresponding rpn pin bits (see table 11-2 for input pin selection numbers) 1111100 = input tied to rpi124 0000001 = input tied to cmp1 0000000 = input tied to v ss downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 181 dspic33epxxxgm3xx/6xx/7xx register 11-7: rpinr10: peripheral pin select input register 10 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ic8r<6:0> bit 15 bit 8 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ic7r<6:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 unimplemented: read as 0 bit 14-8 ic8r<6:0>: assign input capture 8 (ic8) to the corresponding rpn pin bits (see table 11-2 for input pin selection numbers) 1111100 = input tied to rpi124 0000001 = input tied to cmp1 0000000 = input tied to v ss bit 7 unimplemented: read as 0 bit 6-0 ic7r<6:0>: assign input capture 7 (ic7) to the corresponding rpn pin bits (see table 11-2 for input pin selection numbers) 1111100 = input tied to rpi124 0000001 = input tied to cmp1 0000000 = input tied to v ss downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 182 ? 2013-2014 microchip technology inc. register 11-8: rpinr11: peripheral pin select input register 11 u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 15 bit 8 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 o c f a r < 6 : 0 > bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-7 unimplemented: read as 0 bit 6-0 ocfar<6:0>: assign output compare fault a (ocfa) to the corresponding rpn pin bits (see table 11-2 for input pin selection numbers) 1111100 = input tied to rpi124 0000001 = input tied to cmp1 0000000 = input tied to v ss downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 183 dspic33epxxxgm3xx/6xx/7xx register 11-9: rpinr12: peripheral pin select input register 12 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 f l t 2 r < 6 : 0 > bit 15 bit 8 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 f l t 1 r < 6 : 0 > bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 unimplemented: read as 0 bit 14-8 flt2r<6:0>: assign pwm fault 2 (flt2) to the corresponding rpn pin bits (see table 11-2 for input pin selection numbers) 1111100 = input tied to rpi124 0000001 = input tied to cmp1 0000000 = input tied to v ss bit 7 unimplemented: read as 0 bit 6-0 flt1r<6:0>: assign pwm fault 1 (flt1) to the corresponding rpn pin bits (see table 11-2 for input pin selection numbers) 1111100 = input tied to rpi124 0000001 = input tied to cmp1 0000000 = input tied to v ss downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 184 ? 2013-2014 microchip technology inc. register 11-10: rpinr14: peripheral pin select input register 14 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 qeb1r<6:0> bit 15 bit 8 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 qea1r<6:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 unimplemented: read as 0 bit 14-8 qeb1r<6:0>: assign qei1 phase b (qeb1) to the corresponding rpn pin bits (see table 11-2 for input pin selection numbers) 1111100 = input tied to rpi124 0000001 = input tied to cmp1 0000000 = input tied to v ss bit 7 unimplemented: read as 0 bit 6-0 qea1r<6:0>: assign qei1 phase a (qea1) to the corresponding rpn pin bits (see table 11-2 for input pin selection numbers) 1111100 = input tied to rpi124 0000001 = input tied to cmp1 0000000 = input tied to v ss downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 185 dspic33epxxxgm3xx/6xx/7xx register 11-11: rpinr15: peripheral pin select input register 15 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 home1r<6:0> bit 15 bit 8 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 indx1r<6:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 unimplemented: read as 0 bit 14-8 home1r<6:0>: assign qei1 home (home1) to the corresponding rpn pin bits (see table 11-2 for input pin selection numbers) 1111100 = input tied to rpi124 0000001 = input tied to cmp1 0000000 = input tied to v ss bit 7 unimplemented: read as 0 bit 6-0 ind1xr<6:0>: assign qei1 index (indx1) to the corresponding rpn pin bits (see table 11-2 for input pin selection numbers) 1111100 = input tied to rpi124 0000001 = input tied to cmp1 0000000 = input tied to v ss downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 186 ? 2013-2014 microchip technology inc. register 11-12: rpinr16: peripheral pin select input register 16 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 qeb2r<6:0> bit 15 bit 8 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 qea2r<6:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 unimplemented: read as 0 bit 14-8 qeb2r<6:0>: assign qei2 phase b (qeb2) to the corresponding rpn/rpin pin bits (see table 11-2 for input pin selection numbers) 1111111 = input tied to rp127 0000001 = input tied to cmp1 0000000 = input tied to v ss bit 7 unimplemented: read as 0 bit 6-0 qea2r<6:0>: assign a qei2 phase a (qea2) to the corresponding rpn/rpin pin bits (see table 11-2 for input pin selection numbers) 1111111 = input tied to rp127 0000001 = input tied to cmp1 0000000 = input tied to v ss downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 187 dspic33epxxxgm3xx/6xx/7xx register 11-13: rpinr17: peripheral pin select input register 17 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 home2r<6:0> bit 15 bit 8 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 indx2r<6:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 unimplemented: read as 0 bit 14-8 home2r<6:0>: assign qei2 home (home2) to the corresponding rpn pin bits (see table 11-2 for input pin selection numbers) 1111100 = input tied to rpi124 0000001 = input tied to cmp1 0000000 = input tied to v ss bit 7 unimplemented: read as 0 bit 6-0 ind2xr<6:0>: assign qei2 index (indx2) to the corresponding rpn pin bits (see table 11-2 for input pin selection numbers) 1111100 = input tied to rpi124 0000001 = input tied to cmp1 0000000 = input tied to v ss downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 188 ? 2013-2014 microchip technology inc. register 11-14: rpinr18: peripheral pin select input register 18 u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 15 bit 8 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 u 1 r x r < 6 : 0 > bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-7 unimplemented: read as 0 bit 6-0 u1rxr<6:0>: assign uart1 receive (u1rx) to the corresponding rpn pin bits (see table 11-2 for input pin selection numbers) 1111100 = input tied to rpi124 0000001 = input tied to cmp1 0000000 = input tied to v ss register 11-15: rpinr19: peripheral pin select input register 19 u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 15 bit 8 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 u 2 r x r < 6 : 0 > bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-7 unimplemented: read as 0 bit 6-0 u2rxr<6:0>: assign uart2 receive (u2rx) to the corresponding rpn pin bits (see table 11-2 for input pin selection numbers) 1111100 = input tied to rpi124 0000001 = input tied to cmp1 0000000 = input tied to v ss downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 189 dspic33epxxxgm3xx/6xx/7xx register 11-16: rpinr22: peripheral pin select input register 22 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 s c k 2 r < 6 : 0 > bit 15 bit 8 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 s d i 2 r < 6 : 0 > bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 unimplemented: read as 0 bit 14-8 sck2r <6:0>: assign spi2 clock input (sck2) to the corresponding rpn pin bits (see table 11-2 for input pin selection numbers) 1111100 = input tied to rpi124 0000001 = input tied to cmp1 0000000 = input tied to v ss bit 7 unimplemented: read as 0 bit 6-0 sdi2r <6:0>: assign spi2 data input (sdi2) to the corresponding rpn pin bits (see table 11-2 for input pin selection numbers) 1111100 = input tied to rpi124 0000001 = input tied to cmp1 0000000 = input tied to v ss downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 190 ? 2013-2014 microchip technology inc. register 11-17: rpinr23: peripheral pin select input register 23 u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 15 bit 8 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ss2r<6:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-7 unimplemented: read as 0 bit 6-0 ss2r <6:0>: assign spi2 slave select (ss2 ) to the corresponding rpn pin bits (see table 11-2 for input pin selection numbers) 1111100 = input tied to rpi124 0000001 = input tied to cmp1 0000000 = input tied to v ss downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 191 dspic33epxxxgm3xx/6xx/7xx register 11-18: rpinr24: peripheral pin select input register 24 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 csck2r<6:0> bit 15 bit 8 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 csdir<6:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 unimplemented: read as 0 bit 14-8 csck2r <6:0>: assign dci clock input (csck) to the corresponding rpn pin bits (see table 11-2 for input pin selection numbers) 1111100 = input tied to rpi124 0000001 = input tied to cmp1 0000000 = input tied to v ss bit 7 unimplemented: read as 0 bit 6-0 csdir <6:0>: assign dci data input (csdi) to the corresponding rpn pin bits (see table 11-2 for input pin selection numbers) 1111100 = input tied to rpi124 0000001 = input tied to cmp1 0000000 = input tied to v ss downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 192 ? 2013-2014 microchip technology inc. register 11-19: rpinr25: peripheral pin select input register 25 u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 15 bit 8 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 c o f s r < 6 : 0 > bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-7 unimplemented: read as 0 bit 6-0 cofsr <6:0>: assign dci frame sync input (cofs) to the corresponding rpn pin bits (see table 11-2 for input pin selection numbers) 1111100 = input tied to rpi124 0000001 = input tied to cmp1 0000000 = input tied to v ss downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 193 dspic33epxxxgm3xx/6xx/7xx register 11-20: rpinr26: peripheral pin select input register 26 ( 1 ) u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 c 2 r x r < 6 : 0 > bit 15 bit 8 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 c 1 r x r < 6 : 0 > bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 unimplemented: read as 0 bit 14-8 c2rxr<6:0>: assign can2 rx input (c2rx) to the corresponding rpn pin bits (see table 11-2 for input pin selection numbers) 1111100 = input tied to rpi124 0000001 = input tied to cmp1 0000000 = input tied to v ss bit 7 unimplemented: read as 0 bit 6-0 c1rxr<6:0>: assign can1 rx input (c1rx) to the corresponding rpn pin bits (see table 11-2 for input pin selection numbers) 1111100 = input tied to rpi124 0000001 = input tied to cmp1 0000000 = input tied to v ss note 1: this register is not available on dspic33epxxxgm3xx devices. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 194 ? 2013-2014 microchip technology inc. register 11-21: rpinr27: peripheral pin select input register 27 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 u3ctsr<6:0> bit 15 bit 8 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 u 3 r x r < 6 : 0 > bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 unimplemented: read as 0 bit 14-8 u3ctsr<6:0>: assign uart3 clear-to-send (u 3c ts ) to the corresponding rpn/rpin pin bits (see table 11-2 for input pin selection numbers) 1111111 = input tied to rp124 0000001 = input tied to cmp1 0000000 = input tied to v ss bit 7 unimplemented: read as 0 bit 6-0 u3rxr<6:0>: assign uart3 receive (u3rx) to the corresponding rpn/rpin pin bits (see table 11-2 for input pin selection numbers) 1111111 = input tied to rp124 0000001 = input tied to cmp1 0000000 = input tied to v ss downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 195 dspic33epxxxgm3xx/6xx/7xx register 11-22: rpinr28: peripheral pin select input register 28 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 u4ctsr<6:0> bit 15 bit 8 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 u 4 r x r < 6 : 0 > bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 unimplemented: read as 0 bit 14-8 u4ctsr<6:0>: assign uart4 clear-to-send (u 4c ts ) to the corresponding rpn/rpin pin bits (see table 11-2 for input pin selection numbers) 1111111 = input tied to rp124 0000001 = input tied to cmp1 0000000 = input tied to v ss bit 7 unimplemented: read as 0 bit 6-0 u4rxr<6:0>: assign uart4 receive (u4rx) to the corresponding rpn/rpin pin bits (see table 11-2 for input pin selection numbers) 1111111 = input tied to rp124 0000001 = input tied to cmp1 0000000 = input tied to v ss downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 196 ? 2013-2014 microchip technology inc. register 11-23: rpinr29: peripheral pin select input register 29 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 s c k 3 r < 6 : 0 > bit 15 bit 8 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 s d i 3 r < 6 : 0 > bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 unimplemented: read as 0 bit 14-8 sck3r<6:0>: assign spi3 clock input (sck3) to the corresponding rpn/rpin pin bits (see table 11-2 for input pin selection numbers) 1111111 = input tied to rp124 0000001 = input tied to cmp1 0000000 = input tied to v ss bit 7 unimplemented: read as 0 bit 6-0 sdi3r<6:0>: assign spi3 data input (sdi3) to the corresponding rpn/rpin pin bits (see table 11-2 for input pin selection numbers) 1111111 = input tied to rp124 0000001 = input tied to cmp1 0000000 = input tied to v ss downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 197 dspic33epxxxgm3xx/6xx/7xx register 11-24: rpinr30: peripheral pin select input register 30 u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 15 bit 8 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ss3r<6:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-7 unimplemented: read as 0 bit 6-0 ss3r<6:0>: assign spi3 slave select input (ss 3 ) to the corresponding rpn/rpin pin bits (see table 11-2 for input pin selection numbers) 1111111 = input tied to rp124 0000001 = input tied to cmp1 0000000 = input tied to v ss downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 198 ? 2013-2014 microchip technology inc. register 11-25: rpinr37: peripheral pin select input register 37 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 synci1r<6:0> bit 15 bit 8 u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 unimplemented: read as 0 bit 14-8 synci1r<6:0>: assign pwm synchronization input 1 to the corresponding rpn pin bits (see table 11-2 for input pin selection numbers) 1111100 = input tied to rpi124 0000001 = input tied to cmp1 0000000 = input tied to v ss bit 7-0 unimplemented: read as 0 downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 199 dspic33epxxxgm3xx/6xx/7xx register 11-26: rpinr38: peripheral pin select input register 38 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 d t c m p 1 r < 6 : 0 > bit 15 bit 8 u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 unimplemented: read as 0 bit 14-8 dtcmp1r<6:0>: assign pwm dead-time compensation input 1 to the corresponding rpn pin bits (see table 11-2 for input pin selection numbers) 1111100 = input tied to rpi124 0000001 = input tied to cmp1 0000000 = input tied to v ss bit 7-0 unimplemented: read as 0 downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 200 ? 2013-2014 microchip technology inc. register 11-27: rpinr39: peripheral pin select input register 39 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 d t c m p 3 r < 6 : 0 > bit 15 bit 8 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 d t c m p 2 r < 6 : 0 > bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 unimplemented: read as 0 bit 14-8 dtcmp3r<6:0>: assign pwm dead-time compensation input 3 to the corresponding rpn pin bits (see table 11-2 for input pin selection numbers) 1111100 = input tied to rpi124 0000001 = input tied to cmp1 0000000 = input tied to v ss bit 7 unimplemented: read as 0 bit 6-0 dtcmp2r<6:0>: assign pwm dead-time compensation input 2 to the corresponding rpn pin bits (see table 11-2 for input pin selection numbers) 1111100 = input tied to rpi124 0000001 = input tied to cmp1 0000000 = input tied to v ss downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 201 dspic33epxxxgm3xx/6xx/7xx register 11-28: rpinr40: peripheral pin select input register 40 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 d t c m p 5 r < 6 : 0 > bit 15 bit 8 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 d t c m p 4 r < 6 : 0 > bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 unimplemented: read as 0 bit 14-8 dtcmp5r<6:0>: assign pwm dead-time compensation input 5 to the corresponding rpn pin bits (see table 11-2 for input pin selection numbers) 1111100 = input tied to rpi124 0000001 = input tied to cmp1 0000000 = input tied to v ss bit 7 unimplemented: read as 0 bit 6-0 dtcmp4r<6:0>: assign pwm dead-time compensation input 4 to the corresponding rpn pin bits (see table 11-2 for input pin selection numbers) 1111100 = input tied to rpi124 0000001 = input tied to cmp1 0000000 = input tied to v ss downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 202 ? 2013-2014 microchip technology inc. register 11-29: rpinr41: peripheral pin select input register 41 u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 15 bit 8 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 d t c m p 6 r < 6 : 0 > bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-7 unimplemented: read as 0 bit 6-0 dtcmp6r<6:0>: assign pwm dead-time compensation input 6 to the corresponding rpn pin bits (see table 11-2 for input pin selection numbers) 1111100 = input tied to rpi124 0000001 = input tied to cmp1 0000000 = input tied to v ss downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 203 dspic33epxxxgm3xx/6xx/7xx register 11-30: rpor0: peripheral pin select output register 0 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r p 3 5 r < 5 : 0 > bit 15 bit 8 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r p 2 0 r < 5 : 0 > bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-14 unimplemented: read as 0 bit 13-8 rp35r<5:0>: peripheral output function is assigned to rp35 output pin bits (see table 11-3 for peripheral function numbers) bit 7-6 unimplemented: read as 0 bit 5-0 rp20r<5:0>: peripheral output function is assigned to rp20 output pin bits (see table 11-3 for peripheral function numbers) register 11-31: rpor1: peripheral pin select output register 1 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r p 3 7 r < 5 : 0 > bit 15 bit 8 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r p 3 6 r < 5 : 0 > bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-14 unimplemented: read as 0 bit 13-8 rp37r<5:0>: peripheral output function is assigned to rp37 output pin bits (see table 11-3 for peripheral function numbers) bit 7-6 unimplemented: read as 0 bit 5-0 rp36r<5:0>: peripheral output function is assigned to rp36 output pin bits (see table 11-3 for peripheral function numbers) downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 204 ? 2013-2014 microchip technology inc. register 11-32: rpor2: peripheral pin select output register 2 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r p 3 9 r < 5 : 0 > bit 15 bit 8 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r p 3 8 r < 5 : 0 > bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-14 unimplemented: read as 0 bit 13-8 rp39r<5:0>: peripheral output function is assigned to rp39 output pin bits (see table 11-3 for peripheral function numbers) bit 7-6 unimplemented: read as 0 bit 5-0 rp38r<5:0>: peripheral output function is assigned to rp38 output pin bits (see table 11-3 for peripheral function numbers) register 11-33: rpor3: peripheral pin select output register 3 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r p 4 1 r < 5 : 0 > bit 15 bit 8 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r p 4 0 r < 5 : 0 > bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-14 unimplemented: read as 0 bit 13-8 rp41r<5:0>: peripheral output function is assigned to rp41 output pin bits (see table 11-3 for peripheral function numbers) bit 7-6 unimplemented: read as 0 bit 5-0 rp40r<5:0>: peripheral output function is assigned to rp40 output pin bits (see table 11-3 for peripheral function numbers) downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 205 dspic33epxxxgm3xx/6xx/7xx register 11-34: rpor4: peripheral pin select output register 4 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r p 4 3 r < 5 : 0 > bit 15 bit 8 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r p 4 2 r < 5 : 0 > bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-14 unimplemented: read as 0 bit 13-8 rp43r<5:0>: peripheral output function is assigned to rp43 output pin bits (see table 11-3 for peripheral function numbers) bit 7-6 unimplemented: read as 0 bit 5-0 rp42r<5:0>: peripheral output function is assigned to rp42 output pin bits (see table 11-3 for peripheral function numbers) register 11-35: rpor5: peripheral pin select output register 5 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r p 4 9 r < 5 : 0 > bit 15 bit 8 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r p 4 8 r < 5 : 0 > bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-14 unimplemented: read as 0 bit 13-8 rp49r<5:0>: peripheral output function is assigned to rp49 output pin bits (see table 11-3 for peripheral function numbers) bit 7-6 unimplemented: read as 0 bit 5-0 rp48r<5:0>: peripheral output function is assigned to rp48 output pin bits (see table 11-3 for peripheral function numbers) downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 206 ? 2013-2014 microchip technology inc. register 11-36: rpor6: peripheral pin select output register 6 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 rp55r<5:0> bit 15 bit 8 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 rp54r<5:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-14 unimplemented: read as 0 bit 13-8 rp55r<5:0>: peripheral output function is assigned to rp55 output pin bits (see table 11-3 for peripheral function numbers) bit 7-6 unimplemented: read as 0 bit 5-0 rp54r<5:0>: peripheral output function is assigned to rp54 output pin bits (see table 11-3 for peripheral function numbers) register 11-37: rpor7: peripheral pin select output register 7 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r p 5 7 r < 5 : 0 > bit 15 bit 8 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r p 5 6 r < 5 : 0 > bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-14 unimplemented: read as 0 bit 13-8 rp57r<5:0>: peripheral output function is assigned to rp57 output pin bits (see table 11-3 for peripheral function numbers) bit 7-6 unimplemented: read as 0 bit 5-0 rp56r<5:0>: peripheral output function is assigned to rp56 output pin bits (see table 11-3 for peripheral function numbers) downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 207 dspic33epxxxgm3xx/6xx/7xx register 11-38: rpor8: peripheral pin select output register 8 ( 1 ) u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r p 7 0 r < 5 : 0 > bit 15 bit 8 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r p 6 9 r < 5 : 0 > bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-14 unimplemented: read as 0 bit 13-8 rp70r<5:0>: peripheral output function is assigned to rp70 output pin bits (see table 11-3 for peripheral function numbers) bit 7-6 unimplemented: read as 0 bit 5-0 rp69r<5:0>: peripheral output function is assigned to rp69 output pin bits (see table 11-3 for peripheral function numbers) note 1: this register is not available on dspic33epxxxgm304/604 devices. register 11-39: rpor9: peripheral pin select output register 9 ( 1 ) u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r p 9 7 r < 5 : 0 > bit 15 bit 8 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 rp81r<5:0> ( 2 ) bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-14 unimplemented: read as 0 bit 13-8 rp97r<5:0>: peripheral output function is assigned to rp97 output pin bits (see table 11-3 for peripheral function numbers) bit 7-6 unimplemented: read as 0 bit 5-0 rp81r<5:0>: peripheral output function is assigned to rp81 output pin bits ( 2 ) (see table 11-3 for peripheral function numbers) note 1: this register is not available on dspic33epxxxgm304/604 devices. 2: these bits are not available on dspic33epxxxgm306/706 devices. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 208 ? 2013-2014 microchip technology inc. register 11-40: rpor10: peripheral pin select output register 10 ( 1 ) u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 rp118r<5:0> bit 15 bit 8 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 rp113r<5:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-14 unimplemented: read as 0 bit 13-8 rp118r<5:0>: peripheral output function is assigned to rp118 output pin bits (see table 11-3 for peripheral function numbers) bit 7-6 unimplemented: read as 0 bit 5-0 rp113r<5:0>: peripheral output function is assigned to rp113 output pin bits (see table 11-3 for peripheral function numbers) note 1: this register is not available on dspic33epxxxgm30x/604/706 devices. register 11-41: rpor11: peripheral pin select output register 11 ( 1 ) u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 rp125r<5:0> bit 15 bit 8 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 rp120r<5:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-14 unimplemented: read as 0 bit 13-8 rp125r<5:0>: peripheral output function is assigned to rp125 output pin bits (see table 11-3 for peripheral function numbers) bit 7-6 unimplemented: read as 0 bit 5-0 rp120r<5:0>: peripheral output function is assigned to rp120 output pin bits (see table 11-3 for peripheral function numbers) note 1: this register is not available on dspic33epxxxgm30x/604/706 devices. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 209 dspic33epxxxgm3xx/6xx/7xx register 11-42: rpor12: peripheral pin select output register 12 ( 1 ) u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 rp127r<5:0> bit 15 bit 8 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 rp126r<5:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-14 unimplemented: read as 0 bit 13-8 rp127r<5:0>: peripheral output function is assigned to rp127 output pin bits (see table 11-3 for peripheral function numbers) bit 7-6 unimplemented: read as 0 bit 5-0 rp126r<5:0>: peripheral output function is assigned to rp126 output pin bits (see table 11-3 for peripheral function numbers) note 1: this register is not available on dspic33epxxxgm30x/604/706 devices. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 210 ? 2013-2014 microchip technology inc. notes: downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 211 dspic33epxxxgm3xx/6xx/7xx 12.0 timer1 the timer1 module is a 16-bit timer that can operate as a free-running, interval timer/counter. the timer1 module has the following unique features over other timers: can be operated in asynchronous counter mode from an external clock source the external clock input (t1ck) can optionally be synchronized to the internal device clock and the clock synchronization is performed after the prescaler a block diagram of timer1 is shown in figure 12-1 . the timer1 module can operate in one of the following modes: timer mode gated timer mode synchronous counter mode asynchronous counter mode in timer and gated timer modes, the input clock is derived from the internal instruction cycle clock (f cy ). in synchronous and asynchronous counter modes, the input clock is derived from the external clock input at the t1ck pin. the timer modes are determined by the following bits: timer clock source control bit (tcs): t1con<1> timer synchronization control bit (tsync): t1con<2> timer gate control bit (tgate): t1con<6> timer control bit settings for different operating modes are given in the table 12-1 . table 12-1: timer mode settings figure 12-1: 16-bit time r1 module block diagram note 1: this data sheet summarizes the features of the dspic33epxxxgm3xx/6xx/7xx family of devices. it is not intended to be a comprehensive reference source. to com- plement the information in this data sheet, refer to the ?dspic33/pic24 family reference manual , timers (ds70362), which is available from the microchip web site ( www.microchip.com ). 2: some registers and associated bits described in this section may not be available on all devices. refer to section 4.0 memory organization in this data sheet for device-specific register and bit information. mode tcs tgate tsync timer 00x gated timer 01x synchronous counter 1x1 asynchronous counter 1x0 tgate tcs 00 10 x1 pr1 tgate set t1if flag 0 1 tsync 1 0 sync equal reset t1ck prescaler (/n) tckps<1:0> gate sync f p (1) falling edge detect tckps<1:0> note 1: f p is the peripheral clock. latch data clk t1clk ctmu edge control logic tmr1 comparator prescaler (/n) downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 212 ? 2013-2014 microchip technology inc. 12.1 timer1 control register register 12-1: t1con: ti mer1 control register r/w-0 u-0 r/w-0 u-0 u-0 u-0 u-0 u-0 ton ( 1 ) t s i d l bit 15 bit 8 u-0 r/w-0 r/w-0 r/w-0 u-0 r/w-0 r/w-0 u-0 tgate tckps1 tckps1 tsync ( 1 ) tcs ( 1 ) bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 ton: timer1 on bit ( 1 ) 1 = starts 16-bit timer1 0 = stops 16-bit timer1 bit 14 unimplemented: read as 0 bit 13 tsidl: timer1 stop in idle mode bit 1 = discontinues module operation when device enters idle mode 0 = continues module operation in idle mode bit 12-7 unimplemented: read as 0 bit 6 tgate: timer1 gated time accumulation enable bit when tcs = 1 : this bit is ignored. when tcs = 0 : 1 = gated time accumulation is enabled 0 = gated time accumulation is disabled bit 5-4 tckps<1:0>: timer1 input clock prescale select bits 11 = 1:256 10 = 1:64 01 = 1:8 00 = 1:1 bit 3 unimplemented: read as 0 bit 2 tsync: timer1 external clock input synchronization select bit ( 1 ) when tcs = 1 : 1 = synchronizes external clock input 0 = does not synchronize external clock input when tcs = 0 : this bit is ignored. bit 1 tcs: timer1 clock source select bit ( 1 ) 1 = external clock is from pin, t1ck (on the rising edge) 0 = internal clock (f p ) bit 0 unimplemented: read as 0 note 1: when timer1 is enabled in external synchronous counter mode (tcs = 1 , tsync = 1 , ton = 1 ), any attempts by user software to write to the tmr1 register are ignored. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 213 dspic33epxxxgm3xx/6xx/7xx 13.0 timer2/3, timer4/5, timer6/7 and timer8/9 the timer2/3, timer4/5, timer6/7 and timer8/9 modules are 32-bit timers, which can also be configured as eight independent 16-bit timers with selectable operating modes. as a 32-bit timer, timer2/3, timer4/5, timer6/7 and timer8/9 operate in three modes: two independent 16-bit timers (e.g., timer2 and timer3) with all 16-bit operating modes (except asynchronous counter mode) single 32-bit timer single 32-bit synchronous counter they also support these features: timer gate operation selectable prescaler settings timer operation during idle and sleep modes interrupt on a 32-bit period register match time base for input capture and output compare modules adc1 event trigger (timer2/3 only) individually, all eight of the 16-bit timers can function as synchronous timers or counters. they also offer the features listed previously, except for the event trigger; this is implemented only with timer2/3. the operating modes and enabled features are determined by setting the appropriate bit(s) in the t2con, t3con, t4con, t5con, t6con, t7con, t8con and t9con regis- ters. t2con, t4con, t6con and t8con are shown in generic form in register 13-1 . t3con, t5con, t7con and t9con are shown in register 13-2 . for 32-bit timer/counter operation, timer2, timer4, timer6 and timer8 are the least significant word (lsw); timer3, timer5, timer7 and timer9 are the most significant word (msw) of the 32-bit timers. a block diagram for an example of a 32-bit timer pair (timer2/3 and timer4/5) is shown in figure 13-3 . note 1: this data sheet summarizes the features of the dspic33epxxxgm3xx/6xx/7xx family of devices. it is not intended to be a comprehensive reference source. to com- plement the information in this data sheet, refer to the ?dspic33/pic24 family reference manual? , timers (ds70362), which is available from the microchip web site ( www.microchip.com ). 2: some registers and associated bits described in this section may not be available on all devices. refer to section 4.0 memory organization in this data sheet for device-specific register and bit information. note: for 32-bit operation, t3con, t5con, t7con and t9con register control bits are ignored. only t2con, t4con, t6con and t8con register control bits are used for setup and control. timer2, timer4, timer6 and timer8 clock and gate inputs are utilized for the 32-bit timer modules, but an interrupt is generated with the timer3, timer5, timer7 and timer9 interrupt flags. note: only timer2, 3, 4 and 5 can trigger a dma data transfer. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 214 ? 2013-2014 microchip technology inc. figure 13-1: type b timer block diagram (x = 2, 4, 6 and 8) figure 13-2: type c timer block diagram (x = 3, 5, 7 and 9) note 1: f p is the peripheral clock. tgate tcs 00 10 x1 prx tgate set txif flag 0 1 equal reset txck tckps<1:0> gate sync f p (1) falling edge detect tckps<1:0> latch data clk txclk tmrx comparator prescaler (/n) prescaler (/n) sync note 1: f p is the peripheral clock. 2: the adcx trigger is available on tmr3 and tmr5 only. tgate tcs 00 10 x1 prx tgate set txif flag 0 1 equal reset txck tckps<1:0> gate sync f p (1) falling edge detect tckps<1:0> latch data clk txclk tmrx comparator prescaler (/n) prescaler (/n) sync adcx start of conversion trigger (2) downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 215 dspic33epxxxgm3xx/6xx/7xx figure 13-3: type b/type c timer pair block diagram (32-bit timer) tgate tcs 00 10x1 comparator tgate set tyif flag (4) 0 1 equal reset txck (3) tckps<1:0> f p (1) tckps<1:0> note 1: f p is the peripheral clock. 2: the adc x trigger is available only on the tmr3:tmr2 andtmr5:tmr4 32-bit timer pairs. 3: timerx is a type b timer (x = 2 and 4). 4: timery is a type c timer (x = 3 and 5). data clk adcx (2) prx (3) tmryhld (4) data bus<15:0> msw lsw prescaler (/n) prescaler (/n) sync gate sync falling edge detect pry (4) tmrx (3) tckps<1:0> latch tmry (4) downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 216 ? 2013-2014 microchip technology inc. 13.1 timer control registers register 13-1: txcon (t2con, t4con, t6con and t8con) control register r/w-0 u-0 r/w-0 u-0 u-0 u-0 u-0 u-0 ton t s i d l bit 15 bit 8 u-0 r/w-0 r/w-0 r/w-0 r/w-0 u-0 r/w-0 u-0 tgate tckps1 tckps0 t32 t c s ( 1 ) bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 ton: timerx on bit when t32 = 1 : 1 = starts 32-bit timerx/y 0 = stops 32-bit timerx/y when t32 = 0 : 1 = starts 16-bit timerx 0 = stops 16-bit timerx bit 14 unimplemented: read as 0 bit 13 tsidl: timerx stop in idle mode bit 1 = discontinues module operation when device enters idle mode 0 = continues module operation in idle mode bit 12-7 unimplemented: read as 0 bit 6 tgate: timerx gated time accumulation enable bit when tcs = 1 : this bit is ignored. when tcs = 0 : 1 = gated time accumulation is enabled 0 = gated time accumulation is disabled bit 5-4 tckps<1:0>: timerx input clock prescale select bits 11 = 1:256 10 = 1:64 01 = 1:8 00 = 1:1 bit 3 t32: 32-bit timer mode select bit 1 = timerx and timery form a single 32-bit timer 0 = timerx and timery act as two 16-bit timers bit 2 unimplemented: read as 0 bit 1 tcs: timerx clock source select bit ( 1 ) 1 = external clock is from pin, txck (on the rising edge) 0 = internal clock (f p ) bit 0 unimplemented: read as 0 note 1: the txck pin is not available on all timers. refer to the pin diagrams section for the available pins. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 217 dspic33epxxxgm3xx/6xx/7xx register 13-2: tycon (t3con, t5con, t7con and t9con) control register r/w-0 u-0 r/w-0 u-0 u-0 u-0 u-0 u-0 ton ( 1 ) t s i d l ( 2 ) bit 15 bit 8 u-0 r/w-0 r/w-0 r/w-0 u-0 u-0 r/w-0 u-0 t g a t e ( 1 ) tckps1 ( 1 ) tckps0 ( 1 ) t c s ( 1 , 3 ) bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 ton: timery on bit ( 1 ) 1 = starts 16-bit timery 0 = stops 16-bit timery bit 14 unimplemented: read as 0 bit 13 tsidl: timery stop in idle mode bit ( 2 ) 1 = discontinues module operation when device enters idle mode 0 = continues module operation in idle mode bit 12-7 unimplemented: read as 0 bit 6 tgate: timery gated time accumulation enable bit ( 1 ) when tcs = 1 : this bit is ignored. when tcs = 0 : 1 = gated time accumulation is enabled 0 = gated time accumulation is disabled bit 5-4 tckps<1:0>: timery input clock prescale select bits ( 1 ) 11 = 1:256 10 = 1:64 01 = 1:8 00 = 1:1 bit 3-2 unimplemented: read as 0 bit 1 tcs: timery clock source select bit ( 1 , 3 ) 1 = external clock from pin, tyck (on the rising edge) 0 = internal clock (f p ) bit 0 unimplemented: read as 0 note 1: when 32-bit operation is enabled (t2con<3> = 1 ), these bits have no effect on timery operation; all timer functions are set through txcon. 2: when 32-bit timer operation is enabled (t32 = 1 ) in the timerx control register (txcon<3>), the tsidl bit must be cleared to operate the 32-bit timer in idle mode. 3: the tyck pin is not available on all timers. see the pin diagrams section for the available pins. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 218 ? 2013-2014 microchip technology inc. notes: downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 219 dspic33epxxxgm3xx/6xx/7xx 14.0 input capture the input capture module is useful in applications requiring frequency (period) and pulse measurement. the dspic33epxxxgm3xx/6xx/7xx devices support up to eight input capture channels. key features of the input capture module include: hardware configurable for 32-bit operation in all modes by cascading two adjacent modules synchronous and trigger modes of output compare operation, with up to 31 user-selectable trigger/sync sources available a 4-level fifo buffer for capturing and holding timer values for several events configurable interrupt generation up to six clock sources available for each module, driving a separate internal 16-bit counter figure 14-1: input capture x module block diagram note 1: this data sheet summarizes the features of the dspic33epxxxgm3xx/6xx/7xx family of devices. it is not intended to be a comprehensive reference source. to com- plement the information in this data sheet, refer to the ?dspic33/pic24 family reference manual , input capture (ds70000352), which is available from the microchip web site ( www.microchip.com ). 2: some registers and associated bits described in this section may not be available on all devices. refer to section 4.0 memory organization in this data sheet for device-specific register and bit information. icxbuf 4-level fifo buffer icx pin icm<2:0> set icxif edge detect logic ici<1:0> icov, icbne interrupt logic system bus prescaler counter 1:1/4/16 and clock synchronizer event and trigger and sync logic clock select icx clock sources trigger and sync sources ictsel<2:0> syncsel<4:0> trigger (1) 16 16 16 icxtmr increment reset note 1: the trigger/sync source is enabled by default and is set to timer3 as a source. this timer must be enabled for proper icx module operation or the trigger/sync sour ce must be changed to another source option. ptg trigger input ctmu edge control logic downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 220 ? 2013-2014 microchip technology inc. 14.1 input capture control registers register 14-1: icxcon1: input capture x control register 1 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 u-0 u-0 icsidl ictsel2 ictsel1 ictsel0 bit 15 bit 8 u-0 r/w-0 r/w-0 r/hc/hs-0 r/hc/hs-0 r/w-0 r/w-0 r/w-0 ici1 ici0 icov icbne icm2 icm1 icm0 bit 7 bit 0 legend: hc = hardware clearable bit hs = hardware settable bit r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-14 unimplemented: read as 0 bit 13 icsidl: input capture x stop in idle mode control bit 1 = input capture x halts in cpu idle mode 0 = input capture x continues to operate in cpu idle mode bit 12-10 ictsel<2:0>: input capture x timer select bits 111 = peripheral clock (f p ) is the clock source of icx 110 = reserved 101 = reserved 100 = t1clk is the clock source of icx (only the synchronous clock is supported) 011 = t5clk is the clock source of icx 010 = t4clk is the clock source of icx 001 = t2clk is the clock source of icx 000 = t3clk is the clock source of icx bit 9-7 unimplemented: read as 0 bit 6-5 ici<1:0>: number of captures per interrupt select bits (this field is not used if icm<2:0> = 001 or 111 ) 11 = interrupts on every fourth capture event 10 = interrupts on every third capture event 01 = interrupts on every second capture event 00 = interrupts on every capture event bit 4 icov: input capture x overflow status flag bit (read-only) 1 = input capture x buffer overflow occurred 0 = no input capture x buffer overflow occurred bit 3 icbne: input capture x buffer not empty status bit (read-only) 1 = input capture x buffer is not empty, at least one more capture value can be read 0 = input capture x buffer is empty bit 2-0 icm<2:0>: input capture x mode select bits 111 = input capture x functions as an interrupt pin only in cpu sleep and idle modes (rising edge detect only, all other control bits are not applicable) 110 = unused (module disabled) 101 = capture mode, every 16th rising edge (prescaler capture mode) 100 = capture mode, every 4th rising edge (prescaler capture mode) 011 = capture mode, every rising edge (simple capture mode) 010 = capture mode, every falling edge (simple capture mode) 001 = capture mode, every edge, rising and falling (edge detect mode, ici<1:0>), is not used in this mode) 000 = input capture x module is turned off downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 221 dspic33epxxxgm3xx/6xx/7xx register 14-2: icxcon2: input capture x control register 2 u-0 u-0 u-0 u-0 u-0 u-0 u-0 r/w-0 i c 3 2 ( 1 ) bit 15 bit 8 r/w-0 r/w/hs-0 u-0 r/w-0 r/w-1 r/w-1 r/w-0 r/w-1 ictrig ( 2 ) trigstat ( 3 ) s y n c s e l 4 ( 4 ) syncsel3 ( 4 ) syncsel2 ( 4 ) syncsel1 ( 4 ) syncsel0 ( 4 ) bit 7 bit 0 legend: hs = hardware settable bit r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-9 unimplemented: read as 0 bit 8 ic32: input capture x 32-bit timer mode select bit (cascade mode) ( 1 ) 1 = odd icx and even icx form a single 32-bit input capture module 0 = cascade module operation is disabled bit 7 ictrig: input capture x trigger operation select bit ( 2 ) 1 = input source is used to trigger the input capture timer (trigger mode) 0 = input source is used to synchronize the input capture timer to the timer of another module (synchronization mode) bit 6 trigstat: timer trigger status bit ( 3 ) 1 = icxtmr has been triggered and is running 0 = icxtmr has not been triggered and is being held clear bit 5 unimplemented: read as 0 note 1: the ic32 bit in both the odd and even icx must be set to enable cascade mode. 2: the input source is selected by the syncsel<4:0> bits of the icxcon2 register. 3: this bit is set by the selected input source (selected by syncsel<4:0> bits); it can be read, set and cleared in software. 4: do not use the icx module as its own sync or trigger source. 5: this option should only be selected as a trigger source and not as a synchronization source. 6: each input capture x module (icx) has one ptg input source. see section 25.0 peripheral trigger generator (ptg) module for more information. ptgo8 = ic1, ic5 ptgo9 = ic2, ic6 ptgo10 = ic3, ic7 ptgo11 = ic4, ic8 downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 222 ? 2013-2014 microchip technology inc. bit 4-0 syncsel<4:0>: input source select for synchronization and trigger operation bits ( 4 ) 11111 = capture timer is unsynchronized 11110 = capture timer is unsynchronized 11101 = capture timer is unsynchronized 11100 = ctmu trigger is the source for the capture timer synchronization 11011 = adc1 interrupt is the source for the capture timer synchronization ( 5 ) 11010 = analog comparator 3 is the source for the capture timer synchronization ( 5 ) 11001 = analog comparator 2 is the source for the capture timer synchronization ( 5 ) 11000 = analog comparator 1 is the source for the capture timer synchronization ( 5 ) 10111 = input capture 8 interrupt is the source for the capture timer synchronization 10110 = input capture 7 interrupt is the source for the capture timer synchronization 10101 = input capture 6 interrupt is the source for the capture timer synchronization 10100 = input capture 5 interrupt is the source for the capture timer synchronization 10011 = input capture 4 interrupt is the source for the capture timer synchronization 10010 = input capture 3 interrupt is the source for the capture timer synchronization 10001 = input capture 2 interrupt is the source for the capture timer synchronization 10000 = input capture 1 interrupt is the source for the capture timer synchronization 01111 = gp timer5 is the source for the capture timer synchronization 01110 = gp timer4 is the source for the capture timer synchronization 01101 = gp timer3 is the source for the capture timer synchronization 01100 = gp timer2 is the source for the capture timer synchronization 01011 = gp timer1 is the source for the capture timer synchronization 01010 = ptgx trigger is the source for the capture timer synchronization ( 6 ) 01001 = capture timer is unsynchronized 01000 = output compare 8 is the source for the capture timer synchronization 00111 = output compare 7 is the source for the capture timer synchronization 00110 = output compare 6 is the source for the capture timer synchronization 00101 = output compare 5 is the source for the capture timer synchronization 00100 = output compare 4 is the source for the capture timer synchronization 00011 = output compare 3 is the source for the capture timer synchronization 00010 = output compare 2 is the source for the capture timer synchronization 00001 = output compare 1 is the source for the capture timer synchronization 00000 = capture timer is unsynchronized register 14-2: icxcon2: input capture x control register 2 (continued) note 1: the ic32 bit in both the odd and even icx must be set to enable cascade mode. 2: the input source is selected by the syncsel<4:0> bits of the icxcon2 register. 3: this bit is set by the selected input source (selected by syncsel<4:0> bits); it can be read, set and cleared in software. 4: do not use the icx module as its own sync or trigger source. 5: this option should only be selected as a trigger source and not as a synchronization source. 6: each input capture x module (icx) has one ptg input source. see section 25.0 peripheral trigger generator (ptg) module for more information. ptgo8 = ic1, ic5 ptgo9 = ic2, ic6 ptgo10 = ic3, ic7 ptgo11 = ic4, ic8 downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 223 dspic33epxxxgm3xx/6xx/7xx 15.0 output compare the output compare module can select one of eight available clock sources for its time base. the module compares the value of the timer with the value of one or two compare registers depending on the operating mode selected. the state of the output pin changes when the timer value matches the compare register value. the output compare module generates either a single output pulse, or a sequence of output pulses, by changing the state of the output pin on the compare match events. the output compare module can also generate interrupts on compare match events and trigger dma data transfers. figure 15-1: output compare x module block diagram note 1: this data sheet summarizes the features of the dspic33epxxxgm3xx/6xx/7xx family of devices. it is not intended to be a comprehensive reference source. to com- plement the information in this data sheet, refer to the ?dspic33/pic24efamily reference manual , output compare (ds70005157), which is available from the microchip web site ( www.microchip.com ). 2: some registers and associated bits described in this section may not be available on all devices. refer to section 4.0 memory organization in this data sheet for device-specific register and bit information. note: see the ?dspic33/pic24 family refer- ence manual? , output compare (ds70005157) for ocxr and ocxrs register restrictions. ocxr buffer comparator ocxtmr ocxcon1 ocxcon2 ocx interrupt ocx pin ocxrs buffer comparator match match trigger and sync logic clock select increment reset ocx clock sources trigger and sync sources reset match event ocfa ocxr ocxrs event event rollover rollover/reset rollover/reset ocx synchronization/trigger event ocfb syncsel<4:0> trigger (1) note 1: the trigger/sync source is enabled by default and is set to timer2 as a source. this timer must be enabled for proper ocx module operation or the trigger/sync s ource must be changed to another source option. ptg trigger input ctmu edge control logic ocx output and fault logic downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 224 ? 2013-2014 microchip technology inc. 15.1 output compare control registers register 15-1: ocxcon1: output compare x control register 1 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 u-0 r/w-0 ocsidl octsel2 octsel1 octsel0 e n f l t b bit 15 bit 8 r/w-0 u-0 r/w-0, hsc r/w-0, hsc r/w-0 r/w-0 r/w-0 r/w-0 enflta ocfltb ocflta trigmode ocm2 ocm1 ocm0 bit 7 bit 0 legend: hsc = hardware settable/clearable bit r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-14 unimplemented: read as 0 bit 13 ocsidl: output compare x stop in idle mode control bit 1 = output compare x halts in cpu idle mode 0 = output compare x continues to operate in cpu idle mode bit 12-10 octsel<2:0>: output compare x clock select bits 111 = peripheral clock (f p ) 110 = reserved 101 = ptgox clock ( 2 ) 100 = t1clk is the clock source of ocx (only the synchronous clock is supported) 011 = t5clk is the clock source of ocx 010 = t4clk is the clock source of ocx 001 = t3clk is the clock source of ocx 000 = t2clk is the clock source of ocx bit 9 unimplemented: read as 0 bit 8 enfltb: fault b input enable bit 1 = output compare x fault b input (ocfb) is enabled 0 = output compare x fault b input (ocfb) is disabled bit 7 enflta: fault a input enable bit 1 = output compare x fault a input (ocfa) is enabled 0 = output compare x fault a input (ocfa) is disabled bit 6 unimplemented: read as 0 bit 5 ocfltb: pwm fault b condition status bit 1 = pwm fault b condition on ocfb pin has occurred 0 = no pwm fault b condition on ocfb pin has occurred bit 4 ocflta: pwm fault a condition status bit 1 = pwm fault a condition on ocfa pin has occurred 0 = no pwm fault a condition on ocfa pin has occurred note 1: ocxr and ocxrs are double-buffered in pwm mode only. 2: each output compare x module (ocx) has one ptg clock source. see section 25.0 peripheral trigger generator (ptg) module for more information. ptgo4 = oc1, oc5 ptgo5 = oc2, oc6 ptgo6 = oc3, oc7 ptgo7 = oc4, oc8 downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 225 dspic33epxxxgm3xx/6xx/7xx bit 3 trigmode: trigger status mode select bit 1 = trigstat (ocxcon2<6>) is cleared when ocxrs = ocxtmr or in software 0 = trigstat is cleared only by software bit 2-0 ocm<2:0>: output compare x mode select bits 111 = center-aligned pwm mode: output sets high when ocxtmr = ocxr and sets low when ocxtmr = ocxrs ( 1 ) 110 = edge-aligned pwm mode: output sets high when ocxtmr = 0 and sets low when ocxtmr = ocxr ( 1 ) 101 = double compare continuous pulse mode: initializes ocx pin low, toggles ocx state continuously on alternate matches of ocxr and ocxrs 100 = double compare single-shot mode: initializes ocx pin low, toggles ocx state on matches of ocxr and ocxrs for one cycle 011 = single compare mode: compare event with ocxr, continuously toggles ocx pin 010 = single compare single-shot mode: initializes ocx pin high, compare event with ocxr, forc es ocx pin low 001 = single compare single-shot mode: initializes ocx pin low, compare event with ocxr, forces ocx pin high 000 = output compare channel is disabled register 15-1: ocxcon1: output compare x control register 1 (continued) note 1: ocxr and ocxrs are double-buffered in pwm mode only. 2: each output compare x module (ocx) has one ptg clock source. see section 25.0 peripheral trigger generator (ptg) module for more information. ptgo4 = oc1, oc5 ptgo5 = oc2, oc6 ptgo6 = oc3, oc7 ptgo7 = oc4, oc8 downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 226 ? 2013-2014 microchip technology inc. register 15-2: ocxcon2: output compare x control register 2 r/w-0 r/w-0 r/w-0 r/w-0 u-0 u-0 u-0 r/w-0 fltmd fltout flttrien ocinv o c 3 2 bit 15 bit 8 r/w-0 r/w-0, hs r/w-0 r/w-0 r/w-1 r/w-1 r/w-0 r/w-0 octrig trigstat octris syncsel4 syncsel3 syncsel2 syncsel1 syncsel0 bit 7 bit 0 legend: hs = hardware settable bit r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 fltmd: fault mode select bit 1 = fault mode is maintained until the fault source is removed; the corresponding ocfltx bit is cleared in software and a new pwm period starts 0 = fault mode is maintained until the fault source is removed and a new pwm period starts bit 14 fltout: fault out bit 1 = pwm output is driven high on a fault 0 = pwm output is driven low on a fault bit 13 flttrien: fault output state select bit 1 = ocx pin is tri-stated on a fault condition 0 = ocx pin i/o state is defined by the fltout bit on a fault condition bit 12 ocinv: ocx invert bit 1 = ocx output is inverted 0 = ocx output is not inverted bit 11-9 unimplemented: read as 0 bit 8 oc32: cascade two ocx modules enable bit (32-bit operation) 1 = cascade module operation is enabled 0 = cascade module operation is disabled bit 7 octrig: ocx trigger/sync select bit 1 = triggers ocx from source designated by the syncselx bits 0 = synchronizes ocx with source designated by the syncselx bits bit 6 trigstat: timer trigger status bit 1 = timer source has been triggered and is running 0 = timer source has not been triggered and is being held clear bit 5 octris: ocx output pin direction select bit 1 = output compare x is tri-stated 0 = output compare x module drives the ocx pin note 1: do not use the ocx module as its own synchronization or trigger source. 2: when the ocy module is turned off, it sends a trigger out signal. if the ocx module uses the ocy module as a trigger source, the ocy module must be unsele cted as a trigger source prior to disabling it. 3: each output compare x module (ocx) has one ptg trigger/sync source. see section 25.0 peripheral trigger generator (ptg) module for more information. ptgo4 = oc1, oc5 ptgo5 = oc2, oc6 ptgo6 = oc3, oc7 ptgo7 = oc4, oc8 downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 227 dspic33epxxxgm3xx/6xx/7xx bit 4-0 syncsel<4:0>: trigger/synchronization source selection bits 11111 = ocxrs compare event is used for synchronization 11110 = int2 is the source for compare timer synchronization 11101 = int1 is the source for compare timer synchronization 11100 = ctmu trigger is the source for compare timer synchronization 11011 = adc1 interrupt is the source for compare timer synchronization 11010 = analog comparator 3 is the source for compare timer synchronization 11001 = analog comparator 2 is the source for compare timer synchronization 11000 = analog comparator 1 is the source for compare timer synchronization 10111 = input capture 8 interrupt is the source for compare timer synchronization 10110 = input capture 7 interrupt is the source for compare timer synchronization 10101 = input capture 6 interrupt is the source for compare timer synchronization 10100 = input capture 5 interrupt is the source for compare timer synchronization 10011 = input capture 4 interrupt is the source for compare timer synchronization 10010 = input capture 3 interrupt is the source for compare timer synchronization 10001 = input capture 2 interrupt is the source for compare timer synchronization 10000 = input capture 1 interrupt is the source for compare timer synchronization 01111 = gp timer5 is the source for compare timer synchronization 01110 = gp timer4 is the source for compare timer synchronization 01101 = gp timer3 is the source for compare timer synchronization 01100 = gp timer2 is the source for compare timer synchronization 01011 = gp timer1 is the source for compare timer synchronization 01010 = ptgx trigger is the source for compare timer synchronization ( 3 ) 01001 = compare timer is unsynchronized 01000 = output compare 8 is the source for compare timer synchronization ( 1 , 2 ) 00111 = output compare 7 is the source for compare timer synchronization ( 1 , 2 ) 00110 = output compare 6 is the source for compare timer synchronization ( 1 , 2 ) 00101 = output compare 5 is the source for compare timer synchronization ( 1 , 2 ) 00100 = output compare 4 is the source for compare timer synchronization ( 1 , 2 ) 00011 = output compare 3 is the source for compare timer synchronization ( 1 , 2 ) 00010 = output compare 2 is the source for compare timer synchronization ( 1 , 2 ) 00001 = output compare 1 is the source for compare timer synchronization ( 1 , 2 ) 00000 = compare timer is unsynchronized register 15-2: ocxcon2: output comp are x control register 2 (continued) note 1: do not use the ocx module as its own synchronization or trigger source. 2: when the ocy module is turned off, it sends a trigger out signal. if the ocx module uses the ocy module as a trigger source, the ocy module must be unsele cted as a trigger source prior to disabling it. 3: each output compare x module (ocx) has one ptg trigger/sync source. see section 25.0 peripheral trigger generator (ptg) module for more information. ptgo4 = oc1, oc5 ptgo5 = oc2, oc6 ptgo6 = oc3, oc7 ptgo7 = oc4, oc8 downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 228 ? 2013-2014 microchip technology inc. notes: downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 229 dspic33epxxxgm3xx/6xx/7xx 16.0 high-speed pwm module the dspic33epxxxgm3xx/6xx/7xx devices support a dedicated pulse-width modulation (pwm) module with up to 12 outputs. the high-speed pwmx module consists of the following major features: six pwm generators two pwm outputs per pwm generator individual period and duty cycle for each pwm pair duty cycle, dead time, phase shift and a frequency resolution of 7.14 ns independent fault and current-limit inputs for six pwm outputs redundant output center-aligned pwm mode output override control chop mode (also known as gated mode) special event trigger prescaler for input clock pwmxl and pwmxh output pin swapping independent pwm frequency, duty cycle and phase-shift changes for each pwm generator dead-time compensation enhanced leading-edge blanking (leb) functionality frequency resolution enhancement pwm capture functionality the high-speed pwmx module contains up to six pwm generators. each pwmx generator provides two pwm outputs: pwmxh and pwmxl . the master time base generator provides a synchronous signal as a common time base to synchronize the various pwm outputs. the individual pwm outputs are available on the output pins of the device. the input fault signals and current- limit signals, when enabled, can monitor and protect the system by placing the pwm outputs into a known safe state. each pwmx can generate a trigger to the adcx module to sample the analog signal at a specific instance during the pwm period. in addition, the high- speed pwmx module also generates a special event trigger to the adcx module, based on either of the two master time bases. the high-speed pwmx module can synchronize itself with an external signal or can act as a synchronizing source to any external device. the synci1 and synci2 input pins that utilize pps, can synchronize the high-speed pwmx module with an external signal. the synco1 and synco2 pins are output pins that provides a synchronous signal to an external device. figure 16-1 illustrates an architectural overview of the high-speed pwmx module and its interconnection with the cpu and other peripherals. 16.1 pwm faults the pwmx module incorporates multiple external fault inputs, which include flt1 and flt2. the inputs are remappable using the pps feature. flt3 is available on 44-pin, 64-pin and 100-pin packages; flt4 through flt8 are available on specific pins on 64-pin and 100-pin packages, and flt32, which has been implemented with class b safety features, and is available on a fixed pin on all devices. these faults provide a safe and reliable way to safely shut down the pwm outputs when the fault input is asserted. 16.1.1 pwm faults at reset during any reset event, the pwmx module maintains ownership of the class b fault, flt32. at reset, this fault is enabled in latched mode to ensure the fail-safe power-up of the application. the application software must clear the pwm fault before enabling the high- speed motor control pwmx module. to clear the fault condition, the flt32 pin must first be pulled high externally or the internal pull-up resistor in the cnpux register can be enabled. note 1: this data sheet summarizes the features of the dspic33epxxxgm3xx/6xx/7xx family of devices. it is not intended to be a comprehensive reference source. to com- plement the information in this data sheet, refer to the dspic33/pic24 family reference manual , high-speed pwm (ds70645), which is available from the microchip web site ( www.microchip.com ). 2: some registers and associated bits described in this section may not be available on all devices. refer to section 4.0 memory organization in this data sheet for device-specific register and bit information. note: in edge-aligned pwm mode, the duty cycle, dead time, phase shift and frequency resolution are 7.14 ns. note: the fault mode may be changed using the fltmod<1:0> bits (fclconx<1:0>), regardless of the state of flt32. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 230 ? 2013-2014 microchip technology inc. 16.1.2 write-protected registers on dspic33epxxxgm3xx/6xx/7xx devices, write protection is implemented for the ioconx and fclconx registers. the write protection feature prevents any inadvertent writes to these registers. this protection feature can be controlled by the pwmlock configuration bit (foscsel<6>). the default state of the write protection feature is enabled (pwmlock = 1 ). the write protection feature can be disabled by configuring: pwmlock = 0 . to gain write access to these locked registers, the user application must write two consecutive values of 0xabcd and 0x4321 to the pwmkey register to perform the unlock operation. the write access to the ioconx or fclconx registers must be the next sfr access following the unlock process. there can be no other sfr accesses during the unlock process and subsequent write access. to write to both the ioconx and fclconx registers requires two unlock operations. the correct unlocking sequence is described in example 16-1 . example 16-1: pwm1 write-protec ted register unlock sequence ; flt32 pin must be pulled high externally in order to clear and disable the fault ; writing to fclcon1 register requires unlock sequence mov #0xabcd, w10 ; load first unlock key to w10 register mov #0x4321, w11 ; load second unlock key to w11 register mov #0x0000, w0 ; load desired value of fclcon1 register in w0 mov w10, pwmkey ; write first unlock key to pwmkey register mov w11, pwmkey ; write second unlock key to pwmkey register mov w0, fclcon1 ; write desired value to fclcon1 register ; set pwm ownership and polarity using the iocon1 register ; writing to iocon1 register requires unlock sequence mov #0xabcd, w10 ; load first unlock key to w10 register mov #0x4321, w11 ; load second unlock key to w11 register mov #0xf000, w0 ; load desired value of iocon1 register in w0 mov w10, pwmkey ; write first unlock key to pwmkey register mov w11, pwmkey ; write second unlock key to pwmkey register mov w0, iocon1 ; write desired value to iocon1 register downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 231 dspic33epxxxgm3xx/6xx/7xx figure 16-1: high-speed pwmx module architectural overview cpu synci1 synco1 pwm1h pwm1l pwm1 interrupt pwm2h-pwm5h pwm2l-pwm5l pwm2-pwm5 pwm6h pwm6l pwm6 interrupt synchronization signal data bus adcx module flt1-flt8, flt32 synchronization signal synchronization signal primary trigger primary special dtcmp1-dtcmp6 fault, current-limit and dead-time compensation event trigger fault, current-limit fault, current-limit f osc interrupt and dead-time compensation and dead-time compensation master time base pwm generator 1 pwm generator 2 through generator 5 pwm generator 6 downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 232 ? 2013-2014 microchip technology inc. figure 16-2: high-speed pwmx module register interconnection diagram mux ptmrx pdcx pwmconx trgconx ptcon, ptcon2 ioconx dtrx pwmxl pwmxh flt1 pwm1l pwm1h fclconx phasex lebconx mux stmrx sdcx sphasex altdtrx pwmcapx user override logic current-limit pwm output mode control logic fault and current-limit logic pwm generator 1 fltx pwm generator 2-pwm generator 6 interrupt logic adcx trigger module control and timing duty cycle register synchronization synchronization master period master period master duty cycle master duty cycle secondary pwm synci1 synco1 sevtcmp comparator special event trigger special event postscaler ptper pmtmr primary master time base master time base counter special event compare trigger clock prescaler comparator comparator comparator 16-bit data bus trigx fault override logic override logic synco2 sevtcmp comparator special event trigger special event postscaler ptper pmtmr secondary master time base master time base counter special event compare trigger comparator clock prescaler dtcmpx dtcmp1 f osc mdc dead-time logic pin control logic comparator downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 233 dspic33epxxxgm3xx/6xx/7xx 16.2 pwmx control registers register 16-1: ptcon: pwmx time base control register r/w-0 u-0 r/w-0 hs/hc-0 r/w-0 r/w-0 r/w-0 r/w-0 pten ptsidl sestat seien eipu ( 1 ) syncpol ( 1 ) syncoen ( 1 ) bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 syncen ( 1 ) syncsrc2 ( 1 ) syncsrc1 ( 1 ) syncsrc0 ( 1 ) sevtps3 ( 1 ) sevtps2 ( 1 ) sevtps1 ( 1 ) sevtps0 ( 1 ) bit 7 bit 0 legend: hc = hardware clearable bit hs = hardware settable bit r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 pten: pwmx module enable bit 1 = pwmx module is enabled 0 = pwmx module is disabled bit 14 unimplemented: read as 0 bit 13 ptsidl: pwmx time base stop in idle mode bit 1 = pwmx time base halts in cpu idle mode 0 = pwmx time base runs in cpu idle mode bit 12 sestat: special event interrupt status bit 1 = special event interrupt is pending 0 = special event interrupt is not pending bit 11 seien: special event interrupt enable bit 1 = special event interrupt is enabled 0 = special event interrupt is disabled bit 10 eipu: enable immediate period updates bit ( 1 ) 1 = active period register is updated immediately 0 = active period register updates occur on pwmx cycle boundaries bit 9 syncpol: synchronize input and output polarity bit ( 1 ) 1 = synci1/synco1 polarity is inverted (active-low) 0 = synci1/synco1 is active-high bit 8 syncoen: primary time base sync enable bit ( 1 ) 1 = synco1 output is enabled 0 = synco1 output is disabled bit 7 syncen: external time base synchronization enable bit ( 1 ) 1 = external synchronization of primary time base is enabled 0 = external synchronization of primary time base is disabled note 1: these bits should be changed only when pten = 0 . in addition, when using the synci1 feature, the user application must program the period register with a value that is slightly larger than the expected period of the external synchronization input signal. 2: see section 25.0 peripheral trigger generator (ptg) module for information on this selection. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 234 ? 2013-2014 microchip technology inc. bit 6-4 syncsrc<2:0>: synchronous source selection bits ( 1 ) 111 = reserved 100 = reserved 011 = ptgo17 ( 2 ) 010 = ptgo16 ( 2 ) 001 = reserved 000 = synci1 bit 3-0 sevtps<3:0>: pwmx special event trigger output postscaler select bits ( 1 ) 1111 = 1:16 postscaler generates special event trigger on every sixteenth compare match event 0001 = 1:2 postscaler generates special event trigger on every second compare match event 0000 = 1:1 postscaler generates special event trigger on every compare match event register 16-1: ptcon: pwmx time base control register (continued) note 1: these bits should be changed only when pten = 0 . in addition, when using the synci1 feature, the user application must program the period register with a value that is slightly larger than the expected period of the external synchronization input signal. 2: see section 25.0 peripheral trigger generator (ptg) module for information on this selection. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 235 dspic33epxxxgm3xx/6xx/7xx register 16-2: ptcon2: pwmx primary mast er clock divider select register 2 u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 15 bit 8 u-0 u-0 u-0 u-0 u-0 r/w-0 r/w-0 r/w-0 p c l k d i v < 2 : 0 > ( 1 ) bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-3 unimplemented: read as 0 bit 2-0 pclkdiv<2:0>: pwmx input clock prescaler (divider) select bits ( 1 ) 111 = reserved 110 = divide-by-64 101 = divide-by-32 100 = divide-by-16 011 = divide-by-8 010 = divide-by-4 001 = divide-by-2 000 = divide-by-1, maximum pwmx timing resolution (power-on default) note 1: these bits should be changed only when pten = 0 . changing the clock selection during operation will yield unpredictable results. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 236 ? 2013-2014 microchip technology inc. register 16-3: ptper: pwmx primary master time base period register r/w-1 r/w-1 r/w-1 r/w-1 r/w-1 r/w-1 r/w-1 r/w-1 ptper<15:8> bit 15 bit 8 r/w-1 r/w-1 r/w-1 r/w-1 r/w-1 r/w-0 r/w-0 r/w-0 ptper<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 ptper<15:0>: primary master time base (pmtmr) period value bits register 16-4: sevtcmp: pwmx prim ary special event compare register r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 sevtcmp<15:8> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 sevtcmp<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 sevtcmp<15:0>: special event compare count value bits downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 237 dspic33epxxxgm3xx/6xx/7xx register 16-5: stcon: pwmx seco ndary time base control register u-0 u-0 u-0 hs/hc-0 r/w-0 r/w-0 r/w-0 r/w-0 sestat seien eipu ( 1 ) syncpol ( 1 ) syncoen ( 1 ) bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 syncen ( 1 ) syncsrc2 ( 1 ) syncsrc1 ( 1 ) syncsrc0 ( 1 ) sevtps3 ( 1 ) sevtps2 ( 1 ) sevtps1 ( 1 ) sevtps0 ( 1 ) bit 7 bit 0 legend: hc = hardware clearable bit hs = hardware settable bit r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-13 unimplemented: read as 0 bit 12 sestat: special event interrupt status bit 1 = special event interrupt is pending 0 = special event interrupt is not pending bit 11 seien: special event interrupt enable bit 1 = special event interrupt is enabled 0 = special event interrupt is disabled bit 10 eipu: enable immediate period updates bit ( 1 ) 1 = active period register is updated immediately 0 = active period register updates occur on pwm cycle boundaries bit 9 syncpol: synchronize input and output polarity bit ( 1 ) 1 = synci2/synco2 polarity is inverted (active-low) 0 = synci2/synco2 is active-high bit 8 syncoen: primary time base sync enable bit ( 1 ) 1 = synco2 output is enabled 0 = synco2 output is disabled bit 7 syncen: external time base synchronization enable bit ( 1 ) 1 = external synchronization of primary time base is enabled 0 = external synchronization of primary time base is disabled bit 6-4 syncsrc<2:0>: synchronous source selection bits ( 1 ) 111 = reserved 100 = reserved 011 = ptgo17 ( 2 ) 010 = ptgo16 ( 2 ) 001 = reserved 000 = synci1 note 1: these bits should be changed only when pten = 0 . in addition, when using the synci1 feature, the user application must program the period register with a value that is slightly larger than the expected period of the external synchronization input signal. 2: see section 25.0 peripheral trigger generator (ptg) module for information on this selection. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 238 ? 2013-2014 microchip technology inc. bit 3-0 sevtps<3:0>: pwmx special event trigger output postscaler select bits ( 1 ) 1111 = 1:16 postscaler generates the special event trigger on every sixteenth compare match event 0001 = 1:2 postscaler generates the special event trigger on every second compare match event 0000 = 1:1 postscaler generates the special event trigger on every compare match event register 16-5: stcon: pwmx secondary time base control register (continued) note 1: these bits should be changed only when pten = 0 . in addition, when using the synci1 feature, the user application must program the period register with a value that is slightly larger than the expected period of the external synchronization input signal. 2: see section 25.0 peripheral trigger generator (ptg) module for information on this selection. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 239 dspic33epxxxgm3xx/6xx/7xx register 16-6: stcon2: pwmx secondary master clock divider select register 2 u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 15 bit 8 u-0 u-0 u-0 u-0 u-0 r/w-0 r/w-0 r/w-0 p c l k d i v < 2 : 0 > ( 1 ) bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-3 unimplemented: read as 0 bit 2-0 pclkdiv<2:0>: pwmx input clock prescaler (divider) select bits ( 1 ) 111 = reserved 110 = divide-by-64 101 = divide-by-32 100 = divide-by-16 011 = divide-by-8 010 = divide-by-4 001 = divide-by-2 000 = divide-by-1, maximum pwmx timing resolution (power-on default) note 1: these bits should be changed only when pten = 0 . changing the clock selection during operation will yield unpredictable results. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 240 ? 2013-2014 microchip technology inc. register 16-7: stper: pwmx secondary master time base period register r/w-1 r/w-1 r/w-1 r/w-1 r/w-1 r/w-1 r/w-1 r/w-1 stper<15:8> bit 15 bit 8 r/w-1 r/w-1 r/w-1 r/w-1 r/w-1 r/w-0 r/w-0 r/w-0 stper<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 stper<15:0>: pwmx secondary master time base (pmtmr) period value bits register 16-8: ssevtcmp: pwmx seco ndary special event compare register r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ssevtcmp<15:8> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ssevtcmp<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 ssevtcmp<15:0>: pwmx secondary special event compare count value bits downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 241 dspic33epxxxgm3xx/6xx/7xx register 16-9: chop: pwmx ch op clock generator register r/w-0 u-0 u-0 u-0 u-0 u-0 r/w-0 r/w-0 chpclken chopclk9 chopclk8 bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 chopclk7 chopclk6 chopclk5 chopclk4 chopclk3 chopclk2 chopclk1 chopclk0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 chpclken: enable chop clock generator bit 1 = chop clock generator is enabled 0 = chop clock generator is disabled bit 14-10 unimplemented: read as 0 bit 9-0 chopclk<9:0>: chop clock divider bits the frequency of the chop clock signal is given by the following expression: chop frequency = (f p /pclkdiv<2:0>)/(chop<9:0> + 1) register 16-10: mdc: pwmx master duty cycle register r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 mdc<15:8> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 mdc<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 mdc<15:0>: pwmx master duty cycle value bits downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 242 ? 2013-2014 microchip technology inc. register 16-11: pwmconx: pwmx control register hs/hc-0 hs/hc-0 hs/hc-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 fltstat ( 1 ) clstat ( 1 ) trgstat fltien clien trgien itb ( 2 ) mdcs ( 2 ) bit 15 bit 8 r/w-0 r/w-0 r/w-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 dtc1 dtc0 dtcp ( 3 ) m t b sc a m ( 2 , 4 ) xpres ( 5 ) iue ( 2 ) bit 7 bit 0 legend: hc = hardware clearable bit hs = hardware settable bit r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 fltstat: fault interrupt status bit ( 1 ) 1 = fault interrupt is pending 0 = no fault interrupt is pending this bit is cleared by setting: fltien = 0 . bit 14 clstat: current-limit interrupt status bit ( 1 ) 1 = current-limit interrupt is pending 0 = no current-limit interrupt is pending this bit is cleared by setting: clien = 0 . bit 13 trgstat: trigger interrupt status bit 1 = trigger interrupt is pending 0 = no trigger interrupt is pending this bit is cleared by setting: trgien = 0 . bit 12 fltien: fault interrupt enable bit 1 = fault interrupt is enabled 0 = fault interrupt is disabled and the fltstat bit is cleared bit 11 clien: current-limit interrupt enable bit 1 = current-limit interrupt is enabled 0 = current-limit interrupt is disabled and the clstat bit is cleared bit 10 trgien: trigger interrupt enable bit 1 = a trigger event generates an interrupt request 0 = trigger event interrupts are disabled and the trgstat bit is cleared bit 9 itb: independent time base mode bit ( 2 ) 1 = phasex register provides the time base period for this pwmx generator 0 = ptper register provides timing for this pwmx generator bit 8 mdcs: master duty cycle register select bit ( 2 ) 1 = mdc register provides duty cycle information for this pwmx generator 0 = pdcx register provides duty cycle information for this pwmx generator note 1: software must clear the interrupt status here and in the corresponding ifsx bit in the interrupt controller. 2: these bits should not be changed after the pwmx is enabled (pten = 1 ). 3: dtc<1:0> = 11 for dtcp to be effective; otherwise, dtcp is ignored. 4: the independent time base (itb = 1 ) mode must be enabled to use center-aligned mode. if itb = 0 , the cam bit is ignored. 5: to operate in external period reset mode, the itb bit must be 1 and the clmod bit in the fclconx register must be 0 . downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 243 dspic33epxxxgm3xx/6xx/7xx bit 7-6 dtc<1:0>: dead-time control bits 11 = dead-time compensation mode 10 = dead-time function is disabled 01 = negative dead time is actively applied for complementary output mode 00 = positive dead time is actively applied for all output modes bit 5 dtcp: dead-time compensation polarity bit ( 3 ) when set to 1 : if dtcmpx = 0 , pwmxl is shortened and pwmxh is lengthened. if dtcmpx = 1 , pwmxh is shortened and pwmxl is lengthened. when set to 0 : if dtcmpx = 0 , pwmhx is shortened and pwmlx is lengthened. if dtcmpx = 1 , pwmlx is shortened and pwmhx is lengthened. bit 4 unimplemented: read as 0 bit 3 mtbs: master time base select bit 1 = pwmx generator uses the secondary master time base for synchronization and as the clock source for the pwmx generation logic (if secondary time base is available) 0 = pwmx generator uses the primary master time base for synchronization and as the clock source for the pwmx generation logic bit 2 cam: center-aligned mode enable bit ( 2 , 4 ) 1 = center-aligned mode is enabled 0 = edge-aligned mode is enabled bit 1 xpres: external pwmx reset control bit ( 5 ) 1 = current-limit source resets the time base for this pwmx generator if it is in independent time base mode 0 = external pins do not affect the pwmx time base bit 0 iue: immediate update enable bit ( 2 ) 1 = updates to the active mdc/pdcx/dtr x/altdtrx/phasex registers are immediate 0 = updates to the active mdc/pdcx/dtrx/altd trx/phasex registers are synchronized to the pwmx period boundary register 16-11: pwmconx: pwmx control register (continued) note 1: software must clear the interrupt status here and in the corresponding ifsx bit in the interrupt controller. 2: these bits should not be changed after the pwmx is enabled (pten = 1 ). 3: dtc<1:0> = 11 for dtcp to be effective; otherwise, dtcp is ignored. 4: the independent time base (itb = 1 ) mode must be enabled to use center-aligned mode. if itb = 0 , the cam bit is ignored. 5: to operate in external period reset mode, the itb bit must be 1 and the clmod bit in the fclconx register must be 0 . downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 244 ? 2013-2014 microchip technology inc. register 16-12: pdcx: pwmx generator duty cycle register r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 pdcx<15:8> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 pdcx<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 pdcx<15:0>: pwmx generator # duty cycle value bits register 16-13: sdcx: pwmx secondary duty cycle register ( 1 ) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 sdcx<15:8> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 sdcx<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 sdcx<15:0>: secondary duty cycle bits for pwmxl output pin bits note 1: the sdcx register is used in independent pwm mode only. when used in independent pwm mode, the sdcx register controls the pwmxl duty cycle. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 245 dspic33epxxxgm3xx/6xx/7xx register 16-14: phasex: pwmx primary phase-shift register r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 phasex<15:8> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 phasex<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 phasex<15:0>: phase-shift value or independent time base period for the pwmx generator bits note 1: if itb (pwmconx<9>) = 0 , the following applies based on the mode of operation: complementary, redundant and push-pull output mode (pmod<1:0> (ioconx<11:10>) = 00 , 01 or 10 ), phasex<15:0> = phase-shift value for pwmxh and pwmxl outputs. 2: if itb (pwmconx<9>) = 1 , the following applies based on the mode of operation: complementary, redundant and push-pull output mode (pmod<1:0> (ioconx<11:10>) = 00 , 01 or 10 ), phasex<15:0> = independent time base period value for pwmxh and pwmxl. register 16-15: sphase x: pwmx secondary phase-shift register ( 1 , 2 ) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 sphasex<15:8> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 sphasex<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 sphasex<15:0>: secondary phase offset for pwmxl output pin bits (used in independent pwm mode only) note 1: if itb (pwmconx<9>) = 0 , the following applies based on the mode of operation: complementary, redundant and push-pull output mode (pmod<1:0> (ioconx<11:10>) = 00 , 01 or 10 ), sphasex<15:0> = not used. true independent output mode (pmod<1:0> (ioconx<11:10>) = 11 ), sphasex<15:0> = phase-shift value for pwmxl only. 2: if itb (pwmconx<9>) = 1 , the following applies based on the mode of operation: complementary, redundant and push-pull output mode (pmod<1:0> (ioconx<11:10>) = 00 , 01 or 10 ), sphasex<15:0> = not used. true independent output mode (pmod<1:0> (ioconx<11:10>) = 11 ), sphasex<15:0> = independent time base period value for pwmxl only. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 246 ? 2013-2014 microchip technology inc. register 16-16: dtrx: pwmx dead-time register u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 d t r x < 1 3 : 8 > bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 dtrx<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-14 unimplemented: read as 0 bit 13-0 dtrx<13:0>: unsigned 14-bit dead-time value for pwmx dead-time unit bits register 16-17: altdtrx: pwmx alternate dead-time register u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 altdtrx<13:8> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 altdtrx<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-14 unimplemented: read as 0 bit 13-0 altdtrx<13:0>: unsigned 14-bit dead-time value for pwmx dead-time unit bits downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 247 dspic33epxxxgm3xx/6xx/7xx register 16-18: trgconx: pwmx trigger control register r/w-0 r/w-0 r/w-0 r/w-0 u-0 u-0 u-0 u-0 trgdiv3 trgdiv2 trgdiv1 trgdiv0 bit 15 bit 8 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 t r g s t r t 5 ( 1 ) trgstrt5 ( 1 ) trgstrt5 ( 1 ) trgstrt5 ( 1 ) trgstrt5 ( 1 ) trgstrt5 ( 1 ) bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-12 trgdiv<3:0>: trigger # output divider bits 1111 = trigger output for every 16th trigger event 1110 = trigger output for every 15th trigger event 1101 = trigger output for every 14th trigger event 1100 = trigger output for every 13th trigger event 1011 = trigger output for every 12th trigger event 1010 = trigger output for every 11th trigger event 1001 = trigger output for every 10th trigger event 1000 = trigger output for every 9th trigger event 0111 = trigger output for every 8th trigger event 0110 = trigger output for every 7th trigger event 0101 = trigger output for every 6th trigger event 0100 = trigger output for every 5th trigger event 0011 = trigger output for every 4th trigger event 0010 = trigger output for every 3rd trigger event 0001 = trigger output for every 2nd trigger event 0000 = trigger output for every trigger event bit 11-6 unimplemented: read as 0 bit 5-0 trgstrt<5:0>: trigger postscaler start enable select bits ( 1 ) 111111 = wait 63 pwm cycles before generating the first trigger event after the module is enabled 000010 = wait 2 pwm cycles before generating the first trigger event after the module is enabled 000001 = wait 1 pwm cycle before generating the first trigger event after the module is enabled 000000 = wait 0 pwm cycles before generating the first trigger event after the module is enabled note 1: the secondary pwm generator cannot generate pwm trigger interrupts. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 248 ? 2013-2014 microchip technology inc. register 16-19: ioconx: pw mx i/o control register ( 2 ) r/w-1 r/w-1 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 penh penl polh poll pmod1 ( 1 ) pmod0 ( 1 ) ovrenh ovrenl bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ovrdat1 ovrdat0 fltdat1 fltdat0 cldat1 cldat0 swap osync bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 penh: pwmxh output pin ownership bit 1 = pwmx module controls the pwmxh pin 0 = gpio module controls the pwmxh pin bit 14 penl: pwmxl output pin ownership bit 1 = pwmx module controls the pwmxl pin 0 = gpio module controls the pwmxl pin bit 13 polh: pwmxh output pin polarity bit 1 = pwmxh pin is active-low 0 = pwmxh pin is active-high bit 12 poll: pwmxl output pin polarity bit 1 = pwmxl pin is active-low 0 = pwmxl pin is active-high bit 11-10 pmod<1:0>: pwmx # i/o pin mode bits ( 1 ) 11 = pwmx i/o pin pair is in the true independent output mode 10 = pwmx i/o pin pair is in push-pull output mode 01 = pwmx i/o pin pair is in redundant output mode 00 = pwmx i/o pin pair is in complementary output mode bit 9 ovrenh: override enable for pwmxh pin bit 1 = ovrdat<1> controls the output on the pwmxh pin 0 = pwmx generator controls the pwmxh pin bit 8 ovrenl: override enable for pwmxl pin bit 1 = ovrdat<0> controls the output on the pwmxl pin 0 = pwmx generator controls the pwmxl pin bit 7-6 ovrdat<1:0>: data for pwmxh, pwmxl pins if override is enabled bits if overenh = 1 , pwmxh is driven to the state specified by ovrdat<1>. if overenl = 1 , pwmxl is driven to the state specified by ovrdat<0>. bit 5-4 fltdat<1:0>: data for pwmxh and pwmxl pins if fltmod is enabled bits if fault is active, pwmxh is driven to the state specified by fltdat<1>. if fault is active, pwmxl is driven to the state specified by fltdat<0>. bit 3-2 cldat<1:0>: data for pwmxh and pwmxl pins if clmod is enabled bits if current limit is active, pwmxh is driven to the state specified by cldat<1>. if current limit is active, pwmxl is driven to the state specified by cldat<0>. note 1: these bits should not be changed after the pwmx module is enabled (pten = 1 ). 2: if the pwmlock configuration bit (foscsel<6>) is a 1 , the ioconx register can only be written after the unlock sequence has been executed. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 249 dspic33epxxxgm3xx/6xx/7xx bit 1 swap: swap pwmxh and pwmxl pins bit 1 = pwmxh output signal is connected to the pwmxl pins; pwmxl output signal is connected to the pwmxh pins 0 = pwmxh and pwmxl pins are mapped to their respective pins bit 0 osync: output override synchronization bit 1 = output overrides via the ovrdat<1:0> bits are synchronized to the pwm time base 0 = output overrides via the ovddat<1:0> bits occur on the next cpu clock boundary register 16-19: ioconx: pw mx i/o control register ( 2 ) (continued) note 1: these bits should not be changed after the pwmx module is enabled (pten = 1 ). 2: if the pwmlock configuration bit (foscsel<6>) is a 1 , the ioconx register can only be written after the unlock sequence has been executed. register 16-20: trigx: pwmx primary trigger compare value register r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 trgcmp<15:8> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 trgcmp<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 trgcmp<15:0>: trigger control value bits when the primary pwmx functions in the local time base, this register contains the compare values that can trigger the adcx module. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 250 ? 2013-2014 microchip technology inc. register 16-21: fclconx: pwmx fau lt current-limit control register r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ifltmod clsrc4 clsrc3 clsrc2 clsrc1 clsrc0 clpol ( 1 ) clmod bit 15 bit 8 r/w-1 r/w-1 r/w-1 r/w-1 r/w-1 r/w-0 r/w-0 r/w-0 fltsrc4 fltsrc3 fltsrc2 fltsrc1 fltsrc0 fltpol ( 1 ) fltmod1 fltmod0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 ifltmod: independent fault mode enable bit 1 = independent fault mode is enabled 0 = independent fault mode is disabled bit 14-10 clsrc<4:0>: current-limit control signal source select for the pwmx generator # bits 11111 = fault 32 11110 = reserved 01100 = op amp/comparator 5 01011 = comparator 4 01010 = op amp/comparator 3 01001 = op amp/comparator 2 01000 = op amp/comparator 1 00111 = fault 8 00110 = fault 7 00101 = fault 6 00100 = fault 5 00011 = fault 4 00010 = fault 3 00001 = fault 2 00000 = fault 1 bit 9 clpol: current-limit polarity for pwmx generator # bit ( 1 ) 1 = the selected current-limit source is active-low 0 = the selected current-limit source is active-high bit 8 clmod: current-limit mode enable for pwmx generator # bit 1 = current-limit mode is enabled 0 = current-limit mode is disabled note 1: these bits should be changed only when pten = 0 . changing the clock selection during operation will yield unpredictable results. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 251 dspic33epxxxgm3xx/6xx/7xx bit 7-3 fltsrc<4:0>: fault control signal source select for pwmx generator # bits 11111 = fault 32 (default) 11110 = reserved 01100 = op amp/comparator 5 01011 = comparator 4 01010 = op amp/comparator 3 01001 = op amp/comparator 2 01000 = op amp/comparator 1 00111 = fault 8 00110 = fault 7 00101 = fault 6 00100 = fault 5 00011 = fault 4 00010 = fault 3 00001 = fault 2 00000 = fault 1 bit 2 fltpol: fault polarity for pwmx generator # bit ( 1 ) 1 = the selected fault source is active-low 0 = the selected fault source is active-high bit 1-0 fltmod<1:0>: fault mode for pwmx generator # bits 11 = fault input is disabled 10 = reserved 01 = the selected fault source forces the pwmxh, pwmxl pins to fltdatx values (cycle) 00 = the selected fault source forces the pwmxh, pwmxl pins to fltdatx values (latched condition) register 16-21: fclconx: pwmx fault curre nt-limit control register (continued) note 1: these bits should be changed only when pten = 0 . changing the clock selection during operation will yield unpredictable results. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 252 ? 2013-2014 microchip technology inc. register 16-22: lebconx: leading-edg e blanking control register x r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 u-0 u-0 phr phf plr plf fltleben clleben bit 15 bit 8 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 b c h ( 1 ) bcl ( 1 ) bphh bphl bplh bpll bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 phr: pwmxh rising edge trigger enable bit 1 = rising edge of pwmxh will trigger the leading-edge blanking counter 0 = leading-edge blanking ignores the rising edge of pwmxh bit 14 phf: pwmxh falling edge trigger enable bit 1 = falling edge of pwmxh will trigger the leading-edge blanking counter 0 = leading-edge blanking ignores the falling edge of pwmxh bit 13 plr: pwmxl rising edge trigger enable bit 1 = rising edge of pwmxl will trigger the leading-edge blanking counter 0 = leading-edge blanking ignores the rising edge of pwmxl bit 12 plf: pwmxl falling edge trigger enable bit 1 = falling edge of pwmxl will trigger the leading-edge blanking counter 0 = leading-edge blanking ignores the falling edge of pwmxl bit 11 fltleben: fault input leading-edge blanking enable bit 1 = leading-edge blanking is applied to the selected fault input 0 = leading-edge blanking is not applied to the selected fault input bit 10 clleben: current-limit leading-edge blanking enable bit 1 = leading-edge blanking is applied to the selected current-limit input 0 = leading-edge blanking is not applied to the selected current-limit input bit 9-6 unimplemented: read as 0 bit 5 bch: blanking in selected blanking signal high enable bit ( 1 ) 1 = state blanking (of current-limit and/or fault input signals) when selected blanking signal is high 0 = no blanking when selected blanking signal is high bit 4 bcl: blanking in selected blanking signal low enable bit ( 1 ) 1 = state blanking (of current-limit and/or fault input signals) when selected blanking signal is low 0 = no blanking when selected blanking signal is low bit 3 bphh: blanking in pwmxh high enable bit 1 = state blanking (of current-limit and/or fault input signals) when pwmxh output is high 0 = no blanking when pwmxh output is high bit 2 bphl: blanking in pwmxh low enable bit 1 = state blanking (of current-limit and/or fault input signals) when pwmxh output is low 0 = no blanking when pwmxh output is low bit 1 bplh: blanking in pwmxl high enable bit 1 = state blanking (of current-limit and/or fault input signals) when pwmxl output is high 0 = no blanking when pwmxl output is high bit 0 bpll: blanking in pwmxl low enable bit 1 = state blanking (of current-limit and/or fault input signals) when pwmxl output is low 0 = no blanking when pwmxl output is low note 1: the blanking signal is selected via the blankselx bits in the auxconx register. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 253 dspic33epxxxgm3xx/6xx/7xx register 16-23: lebdlyx: leading-e dge blanking delay register x u-0 u-0 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 leb<11:8> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 leb<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-12 unimplemented: read as 0 bit 11-0 leb<11:0>: leading-edge blanking delay for current-limit and fault inputs bits downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 254 ? 2013-2014 microchip technology inc. register 16-24: auxconx: pwmx auxiliary control register u-0 u-0 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 blanksel3 blanksel2 blanksel1 blanksel0 bit 15 bit 8 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 chopsel3 chopsel2 chopsel1 chopsel0 chophen choplen bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-12 unimplemented: read as 0 bit 11-8 blanksel<3:0>: pwmx state blank source select bits the selected state blank signal will block the current-limit and/or fault input signals (if enabled via the bch and bcl bits in the lebconx register). 1001 = reserved 0110 = pwm6h is selected as state blank source 0101 = pwm5h is selected as state blank source 0100 = pwm4h is selected as state blank source 0011 = pwm3h is selected as state blank source 0010 = pwm2h is selected as state blank source 0001 = pwm1h is selected as state blank source 0000 = no state blanking bit 7-6 unimplemented: read as 0 bit 5-2 chopsel<3:0>: pwmx chop clock source select bits the selected signal will enable and disable (chop) the selected pwmx outputs. 1001 = reserved 0110 = pwm6h is selected as state blank source 0101 = pwm5h is selected as state blank source 0100 = pwm4h is selected as state blank source 0011 = pwm3h is selected as chop clock source 0010 = pwm2h is selected as chop clock source 0001 = pwm1h is selected as chop clock source 0000 = chop clock generator is selected as chop clock source bit 1 chophen: pwmxh output chopping enable bit 1 = pwmxh chopping function is enabled 0 = pwmxh chopping function is disabled bit 0 choplen: pwmxl output chopping enable bit 1 = pwmxl chopping function is enabled 0 = pwmxl chopping function is disabled downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 255 dspic33epxxxgm3xx/6xx/7xx register 16-25: pwmcapx: pwmx primary time base capture register r-0 r-0 r-0 r-0 r-0 r-0 r-0 r-0 pwmcapx<15:8> ( 1 , 2 ) bit 15 bit 8 r-0 r-0 r-0 r-0 r-0 r-0 r-0 r-0 pwmcapx<7:0> ( 1 , 2 ) bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 pwmcapx<15:0>: pwmx captured time base value bits ( 1 , 2 ) the value in this register represents the captured pwmx time base value when a leading edge is detected on the current-limit input. note 1: the capture feature is only available on a primary output (pwmxh). 2: this feature is active only after leb processing on the current-limit input signal is complete. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 256 ? 2013-2014 microchip technology inc. notes: downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 257 dspic33epxxxgm3xx/6xx/7xx 17.0 quadrature encoder interface (qei) module this chapter describes the quadrature encoder inter- face (qei) module and associated operational modes. the qei module provides the interface to incremental encoders for obtaining mechanical position data. the operational features of the qei module include: 32-bit position counter 32-bit index pulse counter 32-bit interval timer 16-bit velocity counter 32-bit position initialization/capture/compare high register 32-bit position compare low register x4 quadrature count mode external up/down count mode external gated count mode external gated timer mode internal timer mode figure 17-1 illustrates the qeix block diagram. note 1: this data sheet summarizes the features of the dspic33epxxxgm3xx/6xx/7xx family of devices. it is not intended to be a comprehensive reference source. to complement the information in this data sheet, refer to the dspic33/pic24 fam- ily reference manual , quadrature encoder interface (qei) (ds70601) which is available from the microchip web site ( www.microchip.com ). 2: some registers and associated bits described in this section may not be available on all devices. refer to section 4.0 memory organization in this data sheet for device-specific register and bit information. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 258 ? 2013-2014 microchip technology inc. figure 17-1: qeix block diagram quadrature decoder logic cntcmpx qebx qeax indxx countdir f p count count_en 32-bit greater than or equal compare register 32-bit index counter register digital filter homex fhomex data bus 32-bit greater than data bus count_en cnt_dir cnt_dir findxx findxx pcheq 32-bit interval timerx 16-bit index counter hold register 32-bit interval timerx register hold register count_en f p pchge extcnt extcnt dir_gate 16-bit velocity count_en cnt_dir counter register pclle pchge divclk dir cnt_dir dir_gate 1b0 pclle cntpol dir_gate gaten 0 1 divclk or equal comparator 32-bit less than pclle or equal comparator pcleq pchge ccm ? intdiv (velxcnt) (intxtmr) (intxhld) (indxxcnt) (indxxhld) indxxcntl indxxcnth posxcntl posxcnth (qei1gec) (1) 32-bit less than or equal compare register (qei1lec) 16-bit position counter hold register (posxhld) 32-bit initialization and capture register (qei1ic) (1) qcapen note 1: these registers map to the same memory location. outfnc fltren (posxcnt) 32-bit position counter register ? qfdiv downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 259 dspic33epxxxgm3xx/6xx/7xx 17.1 qei control registers register 17-1: qeixcon: qeix control register r/w-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 qeien qeisidl pimod2 ( 1 ) pimod1 ( 1 ) pimod0 ( 1 ) imv1 ( 2 , 4 ) imv0 ( 2 , 4 ) bit 15 bit 8 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 i n t d i v 2 ( 3 ) intdiv1 ( 3 ) intdiv0 ( 3 ) cntpol gaten ccm1 ccm0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 qeien: qeix module counter enable bit 1 = module counters are enabled 0 = module counters are disabled, but sfrs can be read or written to bit 14 unimplemented: read as 0 bit 13 qeisidl: qeix stop in idle mode bit 1 = discontinues module operation when device enters idle mode 0 = continues module operation in idle mode bit 12-10 pimod<2:0>: position counter initialization mode select bits ( 1 ) 111 = reserved 110 = modulo count mode for position counter 101 = resets the position counter when the position counter equals the qeixgec register 100 = second index event after home event initializes the position counter with contents of the qeixic register 011 = first index event after home event initializes the position counter with contents of the qeixic register 010 = next index input event initializes the position counter with contents of the qeixic register 001 = every index input event resets the position counter 000 = index input event does not affect position counter bit 9-8 imv<1:0>: index match value bits ( 2 , 4 ) 1 = required state of phase b input signal for match on index pulse 0 = required state of phase a input signal for match on index pulse bit 7 unimplemented: read as 0 note 1: when ccm<1:0> = 10 or ccm<1:0> = 11 , all of the qei counters operate as timers and the pimod<2:0> bits are ignored. 2: when ccm<1:0> = 00 , and qeax and qebx values match the index match value (imv), the poscnth and poscntl registers are reset. 3: the selected clock rate should be at least twice the expected maximum quadrature count rate. 4: the match value applies to the a and b inputs after the swap and polarity bits have been applied. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 260 ? 2013-2014 microchip technology inc. bit 6-4 intdiv<2:0>: timer input clock prescale select bits (interval timer, main timer (position counter), velocity counter and index counter internal clock divider select) ( 3 ) 111 = 1:128 prescale value 110 = 1:64 prescale value 101 = 1:32 prescale value 100 = 1:16 prescale value 011 = 1:8 prescale value 010 = 1:4 prescale value 001 = 1:2 prescale value 000 = 1:1 prescale value bit 3 cntpol: position and index counter/timer direction select bit 1 = counter direction is negative unless modified by external up/down signal 0 = counter direction is positive unless modified by external up/down signal bit 2 gaten: external count gate enable bit 1 = external gate signal controls position counter operation 0 = external gate signal does not affect position counter/timer operation bit 1-0 ccm<1:0>: counter control mode selection bits 11 = internal timer mode with optional external count is selected 10 = external clock count with optional external count is selected 01 = external clock count with external up/down direction is selected 00 = quadrature encoder interface (x4 mode) count mode is selected register 17-1: qeixcon: qeix control register (continued) note 1: when ccm<1:0> = 10 or ccm<1:0> = 11 , all of the qei counters operate as timers and the pimod<2:0> bits are ignored. 2: when ccm<1:0> = 00 , and qeax and qebx values match the index match value (imv), the poscnth and poscntl registers are reset. 3: the selected clock rate should be at least twice the expected maximum quadrature count rate. 4: the match value applies to the a and b inputs after the swap and polarity bits have been applied. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 261 dspic33epxxxgm3xx/6xx/7xx register 17-2: qeixioc: qe ix i/o control register r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 qcapen fltren qfdiv2 qfdiv1 qfdiv0 outfnc1 outfnc0 swpab bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r-x r-x r-x r-x hompol idxpol qebpol qeapol home index qeb qea bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 qcapen: qeix position counter input capture enable bit 1 = index match event of home input triggers a position capture event 0 = index match event (positive edge) does not trigger a position capture event bit 14 fltren: qeax/qebx/indxx/homex digital filter enable bit 1 = input pin digital filter is enabled 0 = input pin digital filter is disabled (bypassed) bit 13-11 qfdiv<2:0>: qeax/qebx/indxx/homex digital input filter clock divide select bits 111 = 1:128 clock divide 110 = 1:64 clock divide 101 = 1:32 clock divide 100 = 1:16 clock divide 011 = 1:8 clock divide 010 = 1:4 clock divide 001 = 1:2 clock divide 000 = 1:1 clock divide bit 10-9 outfnc<1:0>: qeix module output function mode select bits 11 = the cntcmpx pin goes high when qeixlec ? posxcnt ? qeixgec 10 = the cntcmpx pin goes high when posxcnt ? qeixlec 01 = the cntcmpx pin goes high when posxcnt ? qeixgec 00 = output is disabled bit 8 swpab: swap qeax and qebx inputs bit 1 = qeax and qebx are swapped prior to quadrature decoder logic 0 = qeax and qebx are not swapped bit 7 hompol: homex input polarity select bit 1 = input is inverted 0 = input is not inverted bit 6 idxpol: indxx input polarity select bit 1 = input is inverted 0 = input is not inverted bit 5 qebpol: qebx input polarity select bit 1 = input is inverted 0 = input is not inverted bit 4 qeapol: qeax input polarity select bit 1 = input is inverted 0 = input is not inverted bit 3 home: status of homex input pin after polarity control bit 1 = pin is at logic 1 0 = pin is at logic 0 downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 262 ? 2013-2014 microchip technology inc. bit 2 index: status of indxx input pin after polarity control bit 1 = pin is at logic 1 0 = pin is at logic 0 bit 1 qeb: status of qebx input pin after polarity control and swpab pin swapping bit 1 = pin is at logic 1 0 = pin is at logic 0 bit 0 qea: status of qeax input pin after polarity control and swpab pin swapping bit 1 = pin is at logic 1 0 = pin is at logic 0 register 17-2: qeixioc: qeix i/o control register (continued) downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 263 dspic33epxxxgm3xx/6xx/7xx register 17-3: qeixstat: qeix status register u-0 u-0 hs, r/c-0 r/w-0 hs, r/c-0 r/w-0 hs, r/c-0 r/w-0 pcheqirq pcheqien pcleqirq pcleqien posovirq posovien bit 15 bit 8 hs, r/c-0 r/w-0 hs, r/c-0 r/w-0 hs, r/c-0 r/w-0 hs, r/c-0 r/w-0 pciirq ( 1 ) pciien velovirq velovien homirq homien idxirq idxien bit 7 bit 0 legend: hs = hardware settable bit c = clearable bit r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-14 unimplemented: read as 0 bit 13 pcheqirq: position counter greater than or equal compare status bit 1 = posxcnt qeixgec 0 = posxcnt < qeixgec bit 12 pcheqien: position counter greater than or equal compare interrupt enable bit 1 = interrupt is enabled 0 = interrupt is disabled bit 11 pcleqirq: position counter less than or equal compare status bit 1 = posxcnt qeixlec 0 = posxcnt > qeixlec bit 10 pcleqien: position counter less than or equal compare interrupt enable bit 1 = interrupt is enabled 0 = interrupt is disabled bit 9 posovirq: position counter overflow status bit 1 = overflow has occurred 0 = no overflow has occurred bit 8 posovien: position counter overflow interrupt enable bit 1 = interrupt is enabled 0 = interrupt is disabled bit 7 pciirq: position counter (homing) initialization process complete status bit ( 1 ) 1 = posxcnt was reinitialized 0 = posxcnt was not reinitialized bit 6 pciien: position counter (homing) initialization process complete interrupt enable bit 1 = interrupt is enabled 0 = interrupt is disabled bit 5 velovirq: velocity counter overflow status bit 1 = overflow has occurred 0 = no overflow has occurred bit 4 velovien: velocity counter overflow interrupt enable bit 1 = interrupt is enabled 0 = interrupt is disabled bit 3 homirq: status flag for home event status bit 1 = home event has occurred 0 = no home event has occurred note 1: this status bit is only applicable to pimod<2:0> = 011 and 100 modes. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 264 ? 2013-2014 microchip technology inc. bit 2 homien: home input event interrupt enable bit 1 = interrupt is enabled 0 = interrupt is disabled bit 1 idxirq: status flag for index event status bit 1 = index event has occurred 0 = no index event has occurred bit 0 idxien: index input event interrupt enable bit 1 = interrupt is enabled 0 = interrupt is disabled register 17-3: qeixstat: qeix status register (continued) note 1: this status bit is only applicable to pimod<2:0> = 011 and 100 modes. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 265 dspic33epxxxgm3xx/6xx/7xx register 17-4: posxcnth: position counter x high word register r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 poscnt<31:24> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 poscnt<23:16> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 poscnt<31:16>: high word used to form 32-bit position counter x register (posxcnt) bits register 17-5: posxcntl: positi on counter x low word register r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 poscnt<15:8> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 poscnt<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 poscnt<15:0>: low word used to form 32-bit position counter x register (posxcnt) bits downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 266 ? 2013-2014 microchip technology inc. register 17-6: posxhld: positi on counter x hold register r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 poshld<15:8> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 poshld<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 poshld<15:0>: holding register for reading and writing posxcnt bits register 17-7: velxcnt: velocity counter x register r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 velcnt<15:8> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 velcnt<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 velcnt<15:0>: velocity counter x bits downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 267 dspic33epxxxgm3xx/6xx/7xx register 17-8: indxxcnth: inde x counter x high word register r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 indxcnt<31:24> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 indxcnt<23:16> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 indxcnt<31:16>: high word used to form 32-bit index counter x register (indxxcnt) bits register 17-9: indxxcntl: ind ex counter x low word register r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 indxcnt<15:8> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 indxcnt<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 indxcnt<15:0>: low word used to form 32-bit index counter x register (indxxcnt) bits downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 268 ? 2013-2014 microchip technology inc. register 17-10: indxxhld: index counter x hold register r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 indxhld<15:8> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 indxhld<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 indxhld<15:0>: holding register for reading and writing indxxcnt bits register 17-11: qeixich: qeix initialization/capture high word register r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 qeiic<31:24> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 qeiic<23:16> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 qeiic<31:16>: high word used to form 32-bit initialization/capture register (qeixic) bits register 17-12: qeixicl: qeix initia lization/capture low word register r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 qeiic<15:8> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 qeiic<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 qeiic<15:0>: low word used to form 32-bit initialization/capture register (qeixic) bits downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 269 dspic33epxxxgm3xx/6xx/7xx register 17-13: qeixlech: qeix less than or equal compare high word register r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 qeilec<31:24> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 qeilec<23:16> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 qeilec<31:16>: high word used to form 32-bit less than or equal compare register (qeixlec) bits register 17-14: qeixlecl: qeix less t han or equal compare low word register r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 qeilec<15:8> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 qeilec<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 qeilec<15:0>: low word used to form 32-bit less than or equal compare register (qeixlec) bits downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 270 ? 2013-2014 microchip technology inc. register 17-15: qeixgech: qeix greater than or equal compare high word register r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 qeigec<31:24> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 qeigec<23:16> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 qeigec<31:16>: high word used to form 32-bit greater than or equal compare register (qeixgec) bits register 17-16: qeixgecl: qeix greater than or equal compare low word register r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 qeigec<15:8> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 qeigec<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 qeigec<15:0>: low word used to form 32-bit greater than or equal compare register (qeixgec) bits downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 271 dspic33epxxxgm3xx/6xx/7xx register 17-17: intxtmrh: interv al timerx high word register r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 inttmr<31:24> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 inttmr<23:16> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 inttmr<31:16>: high word used to form 32-bit inte rval timerx register (intxtmr) bits register 17-18: intxtmrl: interval timerx low word register r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 inttmr<15:8> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 inttmr<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 inttmr<15:0>: low word used to form 32-bit interval timerx register (intxtmr) bits downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 272 ? 2013-2014 microchip technology inc. register 17-19: intxhldh: interval timerx hold high word register r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 inthld<31:24> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 inthld<23:16> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 inthld<31:16>: holding register for reading and writing intxtmrh bits register 17-20: intxhldl: interval timerx hold low word register r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 inthld<15:8> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 inthld<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 inthld<15:0>: holding register for reading and writing intxtmrl bits downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 273 dspic33epxxxgm3xx/6xx/7xx 18.0 serial peripheral interface (spi) the spi module is a synchronous serial interface, useful for communicating with other peripheral or microcontroller devices. these peripheral devices can be serial eeproms, shift registers, display drivers, a/d converters, etc. the spi module is compatible with the motorola ? spi and siop interfaces. the dspic33epxxxgm3xx/6xx/7xx device family offers three spi modules on a single device. these modules, which are designated as spi1, spi2 and spi3, are functionally identical. each spi module includes an eight-word fifo buffer and allows dma bus connections. when using the spi module with dma, fifo operation can be disabled. the spi1 module uses dedicated pins which allow for a higher speed when using spi1. the spi2 and spi3 modules take advantage of the peripheral pin select (pps) feature to allow for greater flexibility in pin configuration of these modules, but results in a lower maximum speed. see section 33.0 electrical characteristics for more information. the spix serial interface consists of four pins, as follows: sdix: serial data input sdox: serial data output sckx: shift clock input or output ssx /fsyncx: active-low slave select or frame synchronization i/o pulse the spix module can be configured to operate with two, three or four pins. in 3-pin mode, ssx is not used. in 2-pin mode, neither sdox nor ssx is used. figure 18-1 illustrates the block diagram of the spix module in standard and enhanced modes. note 1: this data sheet summarizes the features of the dspic33epxxxgm3xx/6xx/7xx family of devices. it is not intended to be a comprehensive reference source. to com- plement the information in this data sheet, refer to the ?dspic33/pic24 family reference manual , serial peripheral interface (spi) (ds70005185), which is available from the microchip web site ( www.microchip.com ). 2: some registers and associated bits described in this section may not be available on all devices. refer to section 4.0 memory organization in this data sheet for device-specific register and bit information. note: in this section, the spi modules are referred to together as spix, or separately as spi1, spi2 and spi3. special function registers follow a similar notation. for example, spixcon refers to the control register for the spi1, spi2 and spi3 modules. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 274 ? 2013-2014 microchip technology inc. figure 18-1: spix module block diagram internal data bus sdix sdox ssx /fsyncx sckx bit 0 shift control edge select f p primary 1:1/4/16/64 enable prescaler sync spixbuf control transfer transfer write spixbuf read spixbuf 16 spixcon1<1:0> spixcon1<4:2> master clock note 1: in standard mode, the fifo is only one level deep. clock control 8-level fifo receive buffer (1) spixsr 8-level fifo transmit buffer (1) secondary prescaler 1:1 to 1:8 downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 275 dspic33epxxxgm3xx/6xx/7xx 18.1 spi helpful tips 1. in frame mode, if there is a possibility that the master may not be initialized before the slave: a) if frmpol (spixcon2<13>) = 1 , use a pull-down resistor on ssx . b) if frmpol = 0 , use a pull-up resistor on ssx . 2. in non-framed 3-wire mode (i.e., not using ssx from a master): a) if ckp (spixcon1<6>) = 1 , always place a pull-up resistor on ssx . b) if ckp = 0 , always place a pull-down resistor on ssx . 3. frmen (spixcon2<15>) = 1 and ssen (spixcon1<7>) = 1 are exclusive and invalid. in frame mode, sckx is continuous and the frame sync pulse is active on the ssx pin, which indicates the start of a data frame. 4. in master mode only, set the smp bit (spixcon1<9>) to a 1 for the fastest spi data rate possible. the smp bit can only be set at the same time or after the msten bit (spixcon1<5>) is set. to avoid invalid slave read data to the master, the users master software must ensure enough time for slave software to fill its write buffer before the user application initiates a master write/read cycle. it is always advisable to preload the spixbuf transmit register in advance of the next master transaction cycle. spixbuf is transferred to the spix shift register and is empty once the data transmission begins. note: this insures that the first frame transmis- sion after initialization is not shifted or corrupted. note: this will insure that during power-up and initialization, the master/slave will not lose sync due to an errant sck transition that would cause the slave to accumulate data shift errors, for both transmit and receive, appearing as corrupted data. note: not all third-party devices support frame mode timing. refer to the spix specifications in section 33.0 electrical characteristics for details. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 276 ? 2013-2014 microchip technology inc. 18.2 spi control registers register 18-1: spixstat: spix status and control register r/w-0 u-0 r/w-0 u-0 u-0 r/w-0 r/w-0 r/w-0 spien spisidl spibec2 spibec1 spibec0 bit 15 bit 8 r/w-0 r/c-0, hs r/w-0 r/w-0 r/w-0 r/w-0 r-0, hs, hc r-0, hs, hc srmpt spirov srxmpt sisel2 sisel1 sisel0 spitbf spirbf bit 7 bit 0 legend: r = readable bit w = writable bit c = clearable bit -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown hs = hardware settable bit hc = hardware clearable bit u = unimplemented bi t, read as 0 bit 15 spien: spix enable bit 1 = enables the module and configures sckx, sdox, sdix and ssx as serial port pins 0 = disables the module bit 14 unimplemented: read as 0 bit 13 spisidl: spix stop in idle mode bit 1 = discontinues the module operation when device enters idle mode 0 = continues the module operation in idle mode bit 12-11 unimplemented: read as 0 bit 10-8 spibec<2:0>: spix buffer element count bits (valid in enhanced buffer mode) master mode: number of spix transfers are pending. slave mode: number of spix transfers are unread. bit 7 srmpt: spix shift register (spixsr) empty bit (valid in enhanced buffer mode) 1 = spix shift register is empty and ready to send or receive the data 0 = spix shift register is not empty bit 6 spirov: spix receive overflow flag bit 1 = a new byte/word is completely received and discarded; the user application has not read the previous data in the spixbuf register 0 = no overflow has occurred bit 5 srxmpt: spix receive fifo empty bit (valid in enhanced buffer mode) 1 = rx fifo is empty 0 = rx fifo is not empty bit 4-2 sisel<2:0>: spix buffer interrupt mode bits (valid in enhanced buffer mode) 111 = interrupt when the spix transmit buffer is full (spitbf bit is set) 110 = interrupt when the last bit is shifted into spixsr, and as a result, the tx fifo is empty 101 = interrupt when the last bit is shifted out of spixsr and the transmit is complete 100 = interrupt when one data is shifted into spixsr, and as a result, the tx fifo has one open memory location 011 = interrupt when the spix receive buffer is full (spirbf bit is set) 010 = interrupt when the spix receive buffer is 3/4 or more full 001 = interrupt when data is available in the spix receive buffer (srmpt bit is set) 000 = interrupt when the last data in the spix receive buffer is read, and as a result, the buffer is empty (srxmpt bit is set) downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 277 dspic33epxxxgm3xx/6xx/7xx bit 1 spitbf: spix transmit buffer full status bit 1 = transmit has not yet started, spixtxb is full 0 = transmit has started, spixtxb is empty standard buffer mode: automatically set in hardware when the core writes to the spixbuf location, loading spixtxb. automatically cleared in hardware when the spix module transfers data from spixtxb to spixsr. enhanced buffer mode: automatically set in hardware when the cpu writes to the spixbuf location, loading the last available buffer location. automatically cleared in hardware when a buffer location is available for a cpu w rite operation. bit 0 spirbf: spix receive buffer full status bit 1 = receive is complete, spixrxb is full 0 = receive is incomplete, spixrxb is empty standard buffer mode: automatically set in hardware when spix transfers data from spixsr to spixrxb. automatically cleared in hardware when the core reads the spixbuf location, reading spixrxb. enhanced buffer mode: automatically set in hardware when spix transfers data from spixsr to the buffer, filling the last unread buffer location. automatically cleared in hardware when a buffer location is available for a transfer from spixsr. register 18-1: spixstat: spix status and control register (continued) downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 278 ? 2013-2014 microchip technology inc. register 18-2: spi x con1: spi x control register 1 u-0 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 dissck dissdo mode16 smp cke ( 1 ) bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ssen ( 2 ) ckp msten spre2 ( 3 ) spre1 ( 3 ) spre0 ( 3 ) ppre1 ( 3 ) ppre0 ( 3 ) bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-13 unimplemented: read as 0 bit 12 dissck: disable sckx pin bit (spi master modes only) 1 = internal spi clock is disabled, pin functions as i/o 0 = internal spi clock is enabled bit 11 dissdo: disable sdox pin bit 1 = sdox pin is not used by the module; pin functions as i/o 0 = sdox pin is controlled by the module bit 10 mode16: word/byte communication select bit 1 = communication is word-wide (16 bits) 0 = communication is byte-wide (8 bits) bit 9 smp: spix data input sample phase bit master mode: 1 = input data is sampled at the end of data output time 0 = input data is sampled at the middle of data output time slave mode: smp must be cleared when spix is used in slave mode. bit 8 cke: spix clock edge select bit ( 1 ) 1 = serial output data changes on transition from active clock state to idle clock state (refer to bit 6) 0 = serial output data changes on transition from idle clock state to active clock state (refer to bit 6) bit 7 ssen: slave select enable bit (slave mode) ( 2 ) 1 = ssx pin is used for slave mode 0 = ssx pin is not used by the module; pin is controlled by port function bit 6 ckp: clock polarity select bit 1 = idle state for clock is a high level; active state is a low level 0 = idle state for clock is a low level; active state is a high level bit 5 msten: master mode enable bit 1 = master mode 0 = slave mode note 1: the cke bit is not used in framed spi modes. program this bit to 0 for framed spi modes (frmen = 1 ). 2: this bit must be cleared when frmen = 1 . 3: do not set both primary and secondary prescalers to the value of 1:1. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 279 dspic33epxxxgm3xx/6xx/7xx bit 4-2 spre<2:0>: secondary prescale bits (master mode) ( 3 ) 111 = secondary prescale 1:1 110 = secondary prescale 2:1 000 = secondary prescale 8:1 bit 1-0 ppre<1:0>: primary prescale bits (master mode) ( 3 ) 11 = primary prescale 1:1 10 = primary prescale 4:1 01 = primary prescale 16:1 00 = primary prescale 64:1 register 18-2: spi x con1: spi x control register 1 (continued) note 1: the cke bit is not used in framed spi modes. program this bit to 0 for framed spi modes (frmen = 1 ). 2: this bit must be cleared when frmen = 1 . 3: do not set both primary and secondary prescalers to the value of 1:1. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 280 ? 2013-2014 microchip technology inc. register 18-3: spi x con2: spi x control register 2 r/w-0 r/w-0 r/w-0 u-0 u-0 u-0 u-0 u-0 frmen spifsd frmpol bit 15 bit 8 u-0 u-0 u-0 u-0 u-0 u-0 r/w-0 r/w-0 frmdly spiben bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 frmen: framed spix support bit 1 = framed spix support is enabled (ssx pin is used as the frame sync pulse input/output) 0 = framed spix support is disabled bit 14 spifsd: spix frame sync pulse direction control bit 1 = frame sync pulse input (slave) 0 = frame sync pulse output (master) bit 13 frmpol: frame sync pulse polarity bit 1 = frame sync pulse is active-high 0 = frame sync pulse is active-low bit 12-2 unimplemented: read as 0 bit 1 frmdly: frame sync pulse edge select bit 1 = frame sync pulse coincides with first bit clock 0 = frame sync pulse precedes first bit clock bit 0 spiben: spix enhanced buffer enable bit 1 = enhanced buffer is enabled 0 = enhanced buffer is disabled (standard mode) downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 281 dspic33epxxxgm3xx/6xx/7xx 19.0 inter-integrated circuit? (i 2 c?) the dspic33epxxxgm3xx/6xx/7xx family of devices contains two inter-integrated circuit (i 2 c) modules: i2c1 and i2c2. the i 2 c module provides complete hardware support for both slave and multi-master modes of the i 2 c serial communication standard, with a 16-bit interface. the i 2 c module has a 2-pin interface: the sclx pin is clock. the sdax pin is data. the i 2 c module offers the following key features: i 2 c interface supporting both master and slave modes of operation. i 2 c slave mode supports 7 and 10-bit addressing. i 2 c master mode supports 7 and 10-bit addressing. i 2 c port allows bidirectional transfers between master and slaves. serial clock synchronization for i 2 c port can be used as a handshake mechanism to suspend and resume serial transfer (sclrel control). i 2 c supports multi-master operation, detects bus collision and arbitrates accordingly. intelligent platform management interface (ipmi) support system management bus (smbus) support note 1: this data sheet summarizes the features of the dspic33epxxxgm3xx/6xx/7xx family of devices. it is not intended to be a comprehensive reference source. to com- plement the information in this data sheet, refer to the dspic33/pic24 family reference manual , inter-integrated circuit? (i 2 c?) (ds70000195), which is available from the microchip web site ( www.microchip.com ). 2: some registers and associated bits described in this section may not be available on all devices. refer to section 4.0 memory organization in this data sheet for device-specific register and bit information. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 282 ? 2013-2014 microchip technology inc. figure 19-1: i2cx block diagram ( x = 1 or 2) internal data bus sclx/asclx sdax/asdax shift match detect start and stop bit detect clock address match clock stretching i2cxtrn lsb shift clock brg down counter reload control f p /2 start and stop bit generation acknowledge generation collision detect i2cxcon i2cxstat control logic read lsb write read i2cxbrg i2cxrsr write read write read write read write read write read i2cxmsk i2cxrcv i2cxadd downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 283 dspic33epxxxgm3xx/6xx/7xx 19.1 i 2 c control registers register 19-1: i2cxcon: i2cx control register r/w-0 u-0 r/w-0 r/w-1, hc r/w-0 r/w-0 r/w-0 r/w-0 i2cen i2csidl sclrel ipmien ( 1 ) a10m disslw smen bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0, hc r/w-0, hc r/w-0, hc r/w-0, hc r/w-0, hc gcen stren ackdt acken rcen pen rsen sen bit 7 bit 0 legend: hc = hardware clearable bit r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 i2cen: i2cx enable bit 1 = enables the i2cx module and configures the sdax and sclx pins as serial port pins 0 = disables the i2cx module; all i 2 c? pins are controlled by port functions bit 14 unimplemented: read as 0 bit 13 i2csidl: i2cx stop in idle mode bit 1 = discontinues module operation when device enters an idle mode 0 = continues module operation in idle mode bit 12 sclrel: sclx release control bit (when operating as i 2 c? slave) 1 = releases sclx clock 0 = holds sclx clock low (clock stretch) if stren = 1 : bit is r/w (i.e., software can write 0 to initiate stretch and write 1 to release clock). hardware clears at the beginning of every slave data byte transmission. hardware clears at the end of every slave address byte reception. hardware clears at the end of every slave data byte reception. if stren = 0 : bit is r/s (i.e., software can only write 1 to release clock). hardware clears at the beginning of every slave data byte transmission. hardware clears at the end of every slave address byte reception. bit 11 ipmien: intelligent peripheral management interface (ipmi) enable bit ( 1 ) 1 = ipmi mode is enabled; all addresses are acknowledged 0 = ipmi mode is disabled bit 10 a10m: 10-bit slave address bit 1 = i2cxadd is a 10-bit slave address 0 = i2cxadd is a 7-bit slave address bit 9 disslw: disable slew rate control bit 1 = slew rate control is disabled 0 = slew rate control is enabled bit 8 smen: smbus input levels bit 1 = enables i/o pin thresholds compliant with the smbus specification 0 = disables smbus input thresholds bit 7 gcen: general call enable bit (when operating as i 2 c slave) 1 = enables interrupt when a general call address is received in the i2cxrsr (module is enabled for reception) 0 = general call address is disabled note 1: when performing master operations, ensure that the ipmien bit is set to 0 . downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 284 ? 2013-2014 microchip technology inc. bit 6 stren: sclx clock stretch enable bit (when operating as i 2 c slave) used in conjunction with the sclrel bit. 1 = enables software or receives clock stretching 0 = disables software or receives clock stretching bit 5 ackdt: acknowledge data bit (when operating as i 2 c master, applicable during master receive) value that is transmitted when the software initiates an acknowledge sequence. 1 = sends nack during acknowledge 0 = sends ack during acknowledge bit 4 acken: acknowledge sequence enable bit (when operating as i 2 c master, applicable during master receive) 1 = initiates acknowledge sequence on sdax and sclx pins and transmits ackdt data bit; hardware clears at the end of the master acknowledge sequence 0 = acknowledge sequence is not in progress bit 3 rcen: receive enable bit (when operating as i 2 c master) 1 = enables receive mode for i 2 c; hardware clears at the end of the eighth bit of a master receive data byte 0 = receive sequence is not in progress bit 2 pen: stop condition enable bit (when operating as i 2 c master) 1 = initiates stop condition on sdax and sclx pins; hardware clears at the end of a master stop sequence 0 = stop condition is not in progress bit 1 rsen: repeated start condition enable bit (when operating as i 2 c master) 1 = initiates repeated start condition on sdax and sclx pins; hardware clears at the end of a master repeated start sequence 0 = repeated start condition is not in progress bit 0 sen: start condition enable bit (when operating as i 2 c master) 1 = initiates start condition on sdax and sclx pins; hardware clears at the end of a master start sequence 0 = start condition is not in progress register 19-1: i2cxcon: i2cx control register (continued) note 1: when performing master operations, ensure that the ipmien bit is set to 0 . downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 285 dspic33epxxxgm3xx/6xx/7xx register 19-2: i2cxstat: i2cx status register r-0, hsc r-0, hsc u-0 u-0 u-0 r/c-0, hs r-0, hsc r-0, hsc ackstat trstat bcl gcstat add10 bit 15 bit 8 r/c-0, hs r/c-0, hs r-0, hsc r/c-0, hsc r/c-0, hsc r-0, hsc r-0, hsc r-0, hsc iwcol i2cov d_a p s r_w rbf tbf bit 7 bit 0 legend: c = clearable bit u = unimplemented bit, read as 0 r = readable bit w = writable bit hs = hardware settable bit hsc = hardware settable/clearable bit -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 ackstat: acknowledge status bit (when operating as i 2 c? master, applicable to master transmit operation) 1 = nack received from slave 0 = ack received from slave hardware sets or clears at the end of a slave acknowledge. bit 14 trstat: transmit status bit (when operating as i 2 c master, applicable to master transmit operation) 1 = master transmit is in progress (8 bits + ack) 0 = master transmit is not in progress hardware sets at the beginning of a master transmission. hardware clears at the end of a slave acknowledge. bit 13-11 unimplemented: read as 0 bit 10 bcl: master bus collision detect bit 1 = a bus collision has been detected during a master operation 0 = no collision hardware sets at detection of a bus collision. bit 9 gcstat: general call status bit 1 = general call address was received 0 = general call address was not received hardware sets when address matches the general call address. hardware clears at stop detection. bit 8 add10: 10-bit address status bit 1 = 10-bit address was matched 0 = 10-bit address was not matched hardware sets at a match of the 2nd byte of a matched 10-bit address. hardware clears at stop detection. bit 7 iwcol: i2cx write collision detect bit 1 = an attempt to write to the i2cxtrn register failed because the i 2 c module is busy 0 = no collision hardware sets at an occurrence of a write to i2cxtrn while busy (cleared by software). bit 6 i2cov: i2cx receive overflow flag bit 1 = a byte was received while the i2cxrcv register was still holding the previous byte 0 = no overflow hardware sets at an attempt to transfer i2cxrsr to i2cxrcv (cleared by software). bit 5 d_a: data/address bit (when operating as i 2 c slave) 1 = indicates that the last byte received was data 0 = indicates that the last byte received was a device address hardware clears at a device address match. hardware sets by reception of a slave byte. bit 4 p: stop bit 1 = indicates that a stop bit has been detected last 0 = stop bit was not detected last hardware sets or clears when start, repeated start or stop is detected. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 286 ? 2013-2014 microchip technology inc. bit 3 s: start bit 1 = indicates that a start (or repeated start) bit has been detected last 0 = start bit was not detected last hardware sets or clears when start, repeated start or stop is detected. bit 2 r_w: read/write information bit (when operating as i 2 c slave) 1 = read C indicates data transfer is output from slave 0 = write C indicates data transfer is input to slave hardware sets or clears after reception of an i 2 c device address byte. bit 1 rbf: receive buffer full status bit 1 = receive is complete, i2cxrcv is full 0 = receive is not complete, i2cxrcv is empty hardware sets when i2cxrcv is written with a received byte. hardware clears when software reads i2cxrcv. bit 0 tbf: transmit buffer full status bit 1 = transmit is in progress, i2cxtrn is full 0 = transmit is complete, i2cxtrn is empty hardware sets when software writes to i2cxtrn. hardware clears at completion of data transmi ssion. register 19-2: i2cxstat: i2cx status register (continued) downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 287 dspic33epxxxgm3xx/6xx/7xx register 19-3: i2cxmsk: i2cx sl ave mode address mask register u-0 u-0 u-0 u-0 u-0 u-0 r/w-0 r/w-0 amsk<9:8> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 amsk<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-10 unimplemented: read as 0 bit 9-0 amsk<9:0>: address mask select bits for 10-bit address: 1 = enables masking for bit, ax, of incoming message address; bit match is not required in this position 0 = disables masking for bit, ax; bit match is required in this position for 7-bit address (i2cxmsk<6:0> only): 1 = enables masking for bit, ax + 1, of incoming message address; bit match is not required in this position 0 = disables masking for bit, ax + 1; bit match is required in this position downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 288 ? 2013-2014 microchip technology inc. notes: downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 289 dspic33epxxxgm3xx/6xx/7xx 20.0 universal asynchronous receiver transmitter (uart) the dspic33epxxxgm3xx/6xx/7xx family of devices contains four uart modules. the universal asynchronous receiver transmitter (uart) module is one of the serial i/o modules available in the dspic33epxxxgm3xx/6xx/7xx device family. the uart is a full-duplex, asynchronous system that can communicate with peripheral devices, such as personal computers, lin/j2602, rs-232 and rs-485 interfaces. the module also supports a hardware flow control option with the uxcts and uxrts pins, and also includes an irda ? encoder and decoder. the primary features of the uart module are: full-duplex, 8 or 9-bit data transmission through the uxtx and uxrx pins even, odd or no parity options (for 8-bit data) one or two stop bits hardware flow control option with uxcts and uxrts pins fully integrated baud rate generator with 16-bit prescaler baud rates ranging from 4.375 mbps to 67 bps at 16x mode at 70 mips baud rates ranging from 17.5 mbps to 267 bps at 4x mode at 70 mips 4-deep first-in first-out (fifo) transmit data buffer 4-deep fifo receive data buffer parity, framing and buffer overrun error detection support for 9-bit mode with address detect (9th bit = 1 ) transmit and receive interrupts a separate interrupt for all uart error conditions loopback mode for diagnostic support support for sync and break characters support for automatic baud rate detection irda ? encoder and decoder logic 16x baud clock output for irda ? support a simplified block diagram of the uart module is shown in figure 20-1 . the uart module consists of these key hardware elements: baud rate generator asynchronous transmitter asynchronous receiver figure 20-1: uartx simp lified block diagram note 1: this data sheet summarizes the features of the dspic33epxxxgm3xx/6xx/7xx family of devices. it is not intended to be a comprehensive reference source. to complement the information in this data sheet, refer to the ?dspic33/pic24 family reference manual , universal asynchronous receiver transmitter (uart) (ds70000582), which is available from the microchip web site ( www.microchip.com ). 2: some registers and associated bits described in this section may not be available on all devices. refer to section 4.0 memory organization in this data sheet for device-specific register and bit information. note: hardware flow control using uxrts and uxcts is not available on all pin count devices. see the pin diagrams section for availability. uxrx uartx receiver uartx transmitter uxtx baud rate generator uxrts /bclkx uxcts irda ? hardware flow control downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 290 ? 2013-2014 microchip technology inc. 20.1 uart helpful tips 1. in multi-node direct connect uart networks, uart receive inputs react to the complementary logic level defined by the urxinv bit (uxmode<4>), which defines the idle state, the default of which is logic high (i.e., urxinv = 0 ). because remote devices do not initialize at the same time, it is likely that one of the devices, because the rx line is floating, will trigger a start bit detection and will cause the first byte received, after the device has been initialized, to be invalid. to avoid this situation, the user should use a pull- up or pull-down resistor on the rx pin, depending on the value of the urxinv bit. a) if urxinv = 0 , use a pull-up resistor on the rx pin. b) if urxinv = 1 , use a pull-down resistor on the rx pin. 2. the first character received on wake-up from sleep mode, caused by activity on the uxrx pin of the uart module, will be invalid. in sleep mode, peripheral clocks are disabled. by the time the oscillator system has restarted and stabilized from sleep mode, the baud rate bit sampling clock, relative to the incoming uxrx bit timing, is no longer synchronized, resulting in the first character being invalid. this is to be expected. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 291 dspic33epxxxgm3xx/6xx/7xx 20.2 uart control registers register 20-1: uxmode: uart x mode register r/w-0 u-0 r/w-0 r/w-0 r/w-0 u-0 r/w-0 r/w-0 uarten ( 1 ) usidl iren ( 2 ) rtsmd uen1 uen0 bit 15 bit 8 r/w-0, hc r/w-0 r/w-0, hc r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 wake lpback abaud urxinv brgh pdsel1 pdsel0 stsel bit 7 bit 0 legend: hc = hardware clearable bit r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 uarten: uartx enable bit ( 1 ) 1 = uartx is enabled; all uartx pins are controlled by uartx as defined by uen<1:0> 0 = uartx is disabled; all uartx pins are controlled by port latches; uartx power consumpt ion is minimal bit 14 unimplemented: read as 0 bit 13 usidl: uartx stop in idle mode bit 1 = discontinues module operation when device enters idle mode 0 = continues module operation in idle mode bit 12 iren: irda ? encoder and decoder enable bit ( 2 ) 1 = irda encoder and decoder are enabled 0 = irda encoder and decoder are disabled bit 11 rtsmd: mode selection for uxrts pin bit 1 =uxrts pin is in simplex mode 0 =uxrts pin is in flow control mode bit 10 unimplemented: read as 0 bit 9-8 uen<1:0>: uartx pin enable bits 11 = uxtx, uxrx and bclkx pins are enabled and used; uxcts pin is controlled by port latches ( 3 ) 10 = uxtx, uxrx, uxcts and uxrts pins are enabled and used ( 4 ) 01 = uxtx, uxrx and uxrts pins are enabled and used; uxcts pin is controlled by port latches ( 4 ) 00 = uxtx and uxrx pins are enabled and used; uxcts and uxrts /bclkx pins are controlled by port latches bit 7 wake: wake-up on start bit detect during sleep mode enable bit 1 = uartx continues to sample the uxrx pin, interrupt is generated on the falling edge; bit is cleared in hardware on the following rising edge 0 = no wake-up is enabled bit 6 lpback: uartx loopback mode select bit 1 = enables loopback mode 0 = loopback mode is disabled note 1: refer to the ?dspic33/pic24 family reference manual? , universal asynchronous receiver transmitter (uart) (ds70000582) for information on enabling the uart module for receive or transmit operation. 2: this feature is only available for the 16x brg mode (brgh = 0 ). 3: this feature is only available on 44-pin and 64-pin devices. 4: this feature is only available on 64-pin devices. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 292 ? 2013-2014 microchip technology inc. bit 5 abaud: auto-baud enable bit 1 = enables baud rate measurement on the next character C requires reception of a sync field (55h) before other data; cleared in hardware upon completion 0 = baud rate measurement is disabled or has completed bit 4 urxinv: uartx receive polarity inversion bit 1 = uxrx idle state is 0 0 = uxrx idle state is 1 bit 3 brgh: high baud rate enable bit 1 = brg generates 4 clocks per bit period (4x baud clock, high-speed mode) 0 = brg generates 16 clocks per bit period (16x baud clock, standard mode) bit 2-1 pdsel<1:0>: parity and data selection bits 11 = 9-bit data, no parity 10 = 8-bit data, odd parity 01 = 8-bit data, even parity 00 = 8-bit data, no parity bit 0 stsel: stop bit selection bit 1 = two stop bits 0 = one stop bit register 20-1: uxmode: uart x mode register (continued) note 1: refer to the ?dspic33/pic24 family reference manual? , universal asynchronous receiver transmitter (uart) (ds70000582) for information on enabling the uart module for receive or transmit operation. 2: this feature is only available for the 16x brg mode (brgh = 0 ). 3: this feature is only available on 44-pin and 64-pin devices. 4: this feature is only available on 64-pin devices. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 293 dspic33epxxxgm3xx/6xx/7xx register 20-2: u x sta: uart x status and control register r/w-0 r/w-0 r/w-0 u-0 r/w-0, hc r/w-0 r-0 r-1 utxisel1 utxinv utxisel0 utxbrk utxen ( 1 ) utxbf trmt bit 15 bit 8 r/w-0 r/w-0 r/w-0 r-1 r-0 r-0 r/c-0 r-0 urxisel1 urxisel0 adden ridle perr ferr oerr urxda bit 7 bit 0 legend: c = clearable bit hc = hardware clearable bit r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15,13 utxisel<1:0>: uartx transmission interrupt mode selection bits 11 = reserved; do not use 10 = interrupt when a character is transferred to the transmit shift register (tsr), and as a result, the transmit buffer becomes empty 01 = interrupt when the last character is shifted out of the transmit shift register; all transmit operations are completed 00 = interrupt when a character is transferred to the transmit shift register (this implies there is at least one character open in the transmit buffer) bit 14 utxinv: uartx transmit polarity inversion bit if iren = 0 : 1 = uxtx idle state is 0 0 = uxtx idle state is 1 if iren = 1 : 1 = irda encoded uxtx idle state is 1 0 = irda encoded uxtx idle state is 0 bit 12 unimplemented: read as 0 bit 11 utxbrk: uartx transmit break bit 1 = sends sync break on next transmission C start bit, followed by twelve 0 bits, followed by stop bit; cleared by hardware upon completion 0 = sync break transmission is disabled or has completed bit 10 utxen: uartx transmit enable bit ( 1 ) 1 = transmit is enabled, uxtx pin is controlled by uartx 0 = transmit is disabled, any pending transmission is aborted and the buffer is reset; uxtx pin is controlled by the port bit 9 utxbf: uartx transmit buffer full status bit (read-only) 1 = transmit buffer is full 0 = transmit buffer is not full, at least one more character can be written bit 8 trmt: transmit shift register empty bit (read-only) 1 = transmit shift register is empty and transmit buffer is empty (the last transmission has completed) 0 = transmit shift register is not empty, a transmission is in progress or queued bit 7-6 urxisel<1:0>: uartx receive interrupt mode selection bits 11 = interrupt is set on uxrsr transfer, making the receive buffer full (i.e., has 4 data characters) 10 = interrupt is set on uxrsr transfer, making the receive buffer 3/4 full (i.e., has 3 data characters) 0x = interrupt is set when any character is received and transferred from the uxrsr to the receive buffer; receive buffer has one or more characters note 1: refer to the ?dspic33/pic24 family reference manual? , universal asynchronous receiver transmitter (uart) (ds70000582) for information on enabling the uart module for transmit operation. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 294 ? 2013-2014 microchip technology inc. bit 5 adden: address character detect bit (bit 8 of received data = 1 ) 1 = address detect mode is enabled; if 9-bit mode is not selected, this does not take effect 0 = address detect mode is disabled bit 4 ridle: receiver idle bit (read-only) 1 = receiver is idle 0 = receiver is active bit 3 perr: parity error status bit (read-only) 1 = parity error has been detected for the current character (character at the top of the receive fifo) 0 = parity error has not been detected bit 2 ferr: framing error status bit (read-only) 1 = framing error has been detected for the current character (character at the top of the receive fifo) 0 = framing error has not been detected bit 1 oerr: receive buffer overrun error status bit (clear/read-only) 1 = receive buffer has overflowed 0 = receive buffer has not overflowed; clearing a previously set oerr bit ( 1 ? 0 transition) resets the receive buffer and the uxrsr to the empty state bit 0 urxda: uartx receive buffer data available bit (read-only) 1 = receive buffer has data, at least one more character can be read 0 = receive buffer is empty register 20-2: u x sta: uart x status and control register (continued) note 1: refer to the ?dspic33/pic24 family reference manual? , universal asynchronous receiver transmitter (uart) (ds70000582) for information on enabling the uart module for transmit operation. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 295 dspic33epxxxgm3xx/6xx/7xx 21.0 controller area network (can) module (dspic33epxxxgm6xx/7xx devices only) 21.1 overview the controller area network (can) module is a serial interface, useful for communicating with other can modules or microcontroller devices. this interface/ protocol was designed to allow communications within noisy environments. the dspic33epxxxgm6xx/7xx devices contain two can modules. the can module is a communication controller, imple- menting the can 2.0 a/b protocol, as defined in the bosch can specification. the module supports can 1.2, can 2.0a, can 2.0b passive and can 2.0b active versions of the protocol. the module implemen- tation is a full can system. the can specification is not covered within this data sheet. the reader can refer to the bosch can specification for further details. the can module features are as follows: implementation of the can protocol, can 1.2, can2.0a and can2.0b standard and extended data frames 0-8 bytes of data length programmable bit rate, up to 1 mbit/sec automatic response to remote transmission requests up to 8 transmit buffers with application specified prioritization and abort capability (each buffer can contain up to 8 bytes of data) up to 32 receive buffers (each buffer can contain up to 8 bytes of data) up to 16 full (standard/extended identifier) acceptance filters three full acceptance filter masks devicenet? addressing support programmable wake-up functionality with integrated low-pass filter programmable loopback mode supports self-test operation signaling via interrupt capabilities for all can receiver and transmitter error states programmable clock source programmable link to input capture 2 (ic2) module for timestamping and network synchronization low-power sleep and idle modes the can bus module consists of a protocol engine and message buffering/control. the can protocol engine handles all functions for receiving and transmitting messages on the can bus. messages are transmitted by first loading the appropriate data registers. status and errors can be checked by reading the appropriate registers. any message detected on the can bus is checked for errors and then matched against filters to see if it should be received and stored in one of the receive registers. note 1: this data sheet summarizes the features of the dspic33epxxxgm3xx/6xx/7xx family of devices. it is not intended to be a comprehensive reference source. to com- plement the information in this data sheet, refer to the ?dspic33/pic24 family reference manual , enhanced control- ler area network (ecan?) (ds70353), which is available from the microchip web site ( www.microchip.com ). 2: some registers and associated bits described in this section may not be available on all devices. refer to section 4.0 memory organization in this data sheet for device-specific register and bit information. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 296 ? 2013-2014 microchip technology inc. figure 21-1: canx mo dule block diagram 21.2 modes of operation the canx module can operate in one of several operation modes selected by the user. these modes include: initialization mode disable mode normal operation mode listen only mode listen all messages mode loopback mode modes are requested by setting the reqop<2:0> bits (cxctrl1<10:8>). entry into a mode is acknowledged by monitoring the opmode<2:0> bits (cxctrl1<7:5>). the module does not change the mode and the opmodex bits until a change in mode is acceptable, generally during bus idle time, which is defined as at least 11 consecutive recessive bits. message assembly can protocol engine cxtx buffer cxrx rxf14 filter rxf13 filter rxf12 filter rxf11 filter rxf10 filter rxf9 filter rxf8 filter rxf7 filter rxf6 filter rxf5 filter rxf4 filter rxf3 filter rxf2 filter rxf1 filter rxf0 filter transmit byte sequencer rxm1 mask rxm0 mask control configuration logic cpu bus interrupts trb0 tx/rx buffer control register rxf15 filter rxm2 mask trb7 tx/rx buffer control register trb6 tx/rx buffer control register trb5 tx/rx buffer control register trb4 tx/rx buffer control register trb3 tx/rx buffer control register trb2 tx/rx buffer control register trb1 tx/rx buffer control register dma controller downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 297 dspic33epxxxgm3xx/6xx/7xx 21.3 can control registers register 21-1: cxctrl1: canx control register 1 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-1 r/w-0 r/w-0 csidl abat cancks reqop2 reqop1 reqop0 bit 15 bit 8 r-1 r-0 r-0 u-0 r/w-0 u-0 u-0 r/w-0 opmode2 opmode1 opmode0 cancap w i n bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-14 unimplemented: read as 0 bit 13 csidl: canx stop in idle mode bit 1 = discontinues module operation when device enters idle mode 0 = continues module operation in idle mode bit 12 abat: abort all pending transmissions bit 1 = signals all transmit buffers to abort transmission 0 = module will clear this bit when all transmissions are aborted bit 11 cancks: canx module clock (f can ) source select bit 1 = f can is equal to 2 * f p 0 = f can is equal to f p bit 10-8 reqop<2:0>: request operation mode bits 111 = set listen all messages mode 110 = reserved 101 = reserved 100 = set configuration mode 011 = set listen only mode 010 = set loopback mode 001 = set disable mode 000 = set normal operation mode bit 7-5 opmode<2:0> : operation mode bits 111 = module is in listen all messages mode 110 = reserved 101 = reserved 100 = module is in configuration mode 011 = module is in listen only mode 010 = module is in loopback mode 001 = module is in disable mode 000 = module is in normal operation mode bit 4 unimplemented: read as 0 bit 3 cancap: canx message receive timer capture event enable bit 1 = enables input capture based on can message receive 0 = disables can capture bit 2-1 unimplemented: read as 0 bit 0 win: sfr map window select bit 1 = uses filter window 0 = uses buffer window downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 298 ? 2013-2014 microchip technology inc. register 21-2: cxctrl2: canx control register 2 u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 15 bit 8 u-0 u-0 u-0 r-0 r-0 r-0 r-0 r-0 dncnt<4:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-5 unimplemented: read as 0 bit 4-0 dncnt<4:0>: devicenet? filter bit number bits 10010 - 11111 = invalid selection 10001 = compare up to data byte 3, bit 6 with eid<17> 00001 = compare up to data byte 1, bit 7 with eid<0> 00000 = do not compare data bytes downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 299 dspic33epxxxgm3xx/6xx/7xx register 21-3: cxvec: canx interrupt code register u-0 u-0 u-0 r-0 r-0 r-0 r-0 r-0 filhit4 filhit3 filhit2 filhit1 filhit0 bit 15 bit 8 u-0 r-1 r-0 r-0 r-0 r-0 r-0 r-0 icode6 icode5 icode4 icode3 icode2 icode1 icode0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-13 unimplemented: read as 0 bit 12-8 filhit<4:0>: filter hit number bits 10000 - 11111 = reserved 01111 = filter 15 00001 = filter 1 00000 = filter 0 bit 7 unimplemented: read as 0 bit 6-0 icode<6:0>: interrupt flag code bits 1000101 - 1111111 = reserved 1000100 = fifo almost full interrupt 1000011 = receiver overflow interrupt 1000010 = wake-up interrupt 1000001 = error interrupt 1000000 = no interrupt 0010000 - 0111111 = reserved 0001111 = rb15 buffer interrupt 0001001 = rb9 buffer interrupt 0001000 = rb8 buffer interrupt 0000111 = trb7 buffer interrupt 0000110 = trb6 buffer interrupt 0000101 = trb5 buffer interrupt 0000100 = trb4 buffer interrupt 0000011 = trb3 buffer interrupt 0000010 = trb2 buffer interrupt 0000001 = trb1 buffer interrupt 0000000 = trb0 buffer interrupt downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 300 ? 2013-2014 microchip technology inc. register 21-4: cxfctrl: can x fifo control register r/w-0 r/w-0 r/w-0 u-0 u-0 u-0 u-0 u-0 dmabs2 dmabs1 dmabs0 bit 15 bit 8 u-0 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 fsa4 fsa3 fsa2 fsa1 fsa0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-13 dmabs<2:0>: dma buffer size bits 111 = reserved 110 = 32 buffers in ram 101 = 24 buffers in ram 100 = 16 buffers in ram 011 = 12 buffers in ram 010 = 8 buffers in ram 001 = 6 buffers in ram 000 = 4 buffers in ram bit 12-5 unimplemented: read as 0 bit 4-0 fsa<4:0>: fifo area starts with buffer bits 11111 = receive buffer rb31 11110 = receive buffer rb30 00001 = transmit/receive buffer trb1 00000 = transmit/receive buffer trb0 downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 301 dspic33epxxxgm3xx/6xx/7xx register 21-5: cxfifo: canx fifo status register u-0 u-0 r-0 r-0 r-0 r-0 r-0 r-0 fbp5 fbp4 fbp3 fbp2 fbp1 fbp0 bit 15 bit 8 u-0 u-0 r-0 r-0 r-0 r-0 r-0 r-0 fnrb5 fnrb4 fnrb3 fnrb2 fnrb1 fnrb0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-14 unimplemented: read as 0 bit 13-8 fbp<5:0>: fifo buffer pointer bits 011111 = rb31 buffer 011110 = rb30 buffer 000001 = trb1 buffer 000000 = trb0 buffer bit 7-6 unimplemented: read as 0 bit 5-0 fnrb<5:0>: fifo next read buffer pointer bits 011111 = rb31 buffer 011110 = rb30 buffer 000001 = trb1 buffer 000000 = trb0 buffer downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 302 ? 2013-2014 microchip technology inc. register 21-6: cxintf: canx interrupt flag register u-0 u-0 r-0 r-0 r-0 r-0 r-0 r-0 txbo txbp rxbp txwar rxwar ewarn bit 15 bit 8 r/c-0 r/c-0 r/c-0 u-0 r/c-0 r/c-0 r/c-0 r/c-0 ivrif wakif errif fifoif rbovif rbif tbif bit 7 bit 0 legend: c = writable bit, but only 0 can be written to clear the bit r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-14 unimplemented: read as 0 bit 13 txbo: transmitter in error state bus off bit 1 = transmitter is in bus off state 0 = transmitter is not in bus off state bit 12 txbp: transmitter in error state bus passive bit 1 = transmitter is in bus passive state 0 = transmitter is not in bus passive state bit 11 rxbp: receiver in error state bus passive bit 1 = receiver is in bus passive state 0 = receiver is not in bus passive state bit 10 txwar: transmitter in error state warning bit 1 = transmitter is in error warning state 0 = transmitter is not in error warning state bit 9 rxwar: receiver in error state warning bit 1 = receiver is in error warning state 0 = receiver is not in error warning state bit 8 ewarn: transmitter or receiver in error state warning bit 1 = transmitter or receiver is in error warning state 0 = transmitter or receiver is not in error warning state bit 7 ivrif: invalid message interrupt flag bit 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 6 wakif: bus wake-up activity interrupt flag bit 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 5 errif: error interrupt flag bit (multiple sources in cxintf<13:8> register) 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 4 unimplemented: read as 0 bit 3 fifoif: fifo almost full interrupt flag bit 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 2 rbovif: rx buffer overflow interrupt flag bit 1 = interrupt request has occurred 0 = interrupt request has not occurred downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 303 dspic33epxxxgm3xx/6xx/7xx bit 1 rbif: rx buffer interrupt flag bit 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 0 tbif: tx buffer interrupt flag bit 1 = interrupt request has occurred 0 = interrupt request has not occurred register 21-6: cxintf: canx interrupt flag register (continued) register 21-7: cxinte: canx interrupt enable register u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 15 bit 8 r/w-0 r/w-0 r/w-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 ivrie wakie errie fifoie rbovie rbie tbie bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-8 unimplemented: read as 0 bit 7 ivrie: invalid message interrupt enable bit 1 = interrupt request is enabled 0 = interrupt request is not enabled bit 6 wakie: bus wake-up activity interrupt enable bit 1 = interrupt request is enabled 0 = interrupt request is not enabled bit 5 errie: error interrupt enable bit 1 = interrupt request is enabled 0 = interrupt request is not enabled bit 4 unimplemented: read as 0 bit 3 fifoie: fifo almost full interrupt enable bit 1 = interrupt request is enabled 0 = interrupt request is not enabled bit 2 rbovie: rx buffer overflow interrupt enable bit 1 = interrupt request is enabled 0 = interrupt request is not enabled bit 1 rbie: rx buffer interrupt enable bit 1 = interrupt request is enabled 0 = interrupt request is not enabled bit 0 tbie: tx buffer interrupt enable bit 1 = interrupt request is enabled 0 = interrupt request is not enabled downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 304 ? 2013-2014 microchip technology inc. register 21-8: cxec: canx transmit/receive error count register r-0 r-0 r-0 r-0 r-0 r-0 r-0 r-0 terrcnt7 terrcnt6 terrcnt5 terrcnt4 te rrcnt3 terrcnt2 terrcnt1 terrcnt0 bit 15 bit 8 r-0 r-0 r-0 r-0 r-0 r-0 r-0 r-0 rerrcnt7 rerrcnt6 rerrcnt5 rerrcnt4 re rrcnt3 rerrcnt2 rerrcnt1 rerrcnt0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-8 terrcnt<7:0>: transmit error count bits bit 7-0 rerrcnt<7:0>: receive error count bits register 21-9: cxcfg1: canx bau d rate configuratio n register 1 u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 sjw1 sjw0 brp5 brp4 brp3 brp2 brp1 brp0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-8 unimplemented: read as 0 bit 7-6 sjw<1:0>: synchronization jump width bits 11 = length is 4 x t q 10 = length is 3 x t q 01 = length is 2 x t q 00 = length is 1 x t q bit 5-0 brp<5:0>: baud rate prescaler bits 11 1111 = t q = 2 x 64 x 1/f can 00 0010 = t q = 2 x 3 x 1/f can 00 0001 = t q = 2 x 2 x 1/f can 00 0000 = t q = 2 x 1 x 1/f can downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 305 dspic33epxxxgm3xx/6xx/7xx register 21-10: cxcfg2: canx bau d rate configuratio n register 2 u-0 r/w-x u-0 u-0 u-0 r/w-x r/w-x r/w-x wakfil seg2ph2 seg2ph1 seg2ph0 bit 15 bit 8 r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x seg2phts sam seg1ph2 seg1ph1 seg1ph0 prseg2 prseg1 prseg0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 unimplemented: read as 0 bit 14 wakfil: select can bus line filter for wake-up bit 1 = uses can bus line filter for wake-up 0 = can bus line filter is not used for wake-up bit 13-11 unimplemented: read as 0 bit 10-8 seg2ph<2:0>: phase segment 2 bits 111 = length is 8 x t q 000 = length is 1 x t q bit 7 seg2phts: phase segment 2 time select bit 1 = freely programmable 0 = maximum of seg1phx bits or information processing time (ipt), whichever is greater bit 6 sam: sample of the can bus line bit 1 = bus line is sampled three times at the sample point 0 = bus line is sampled once at the sample point bit 5-3 seg1ph<2:0>: phase segment 1 bits 111 = length is 8 x t q 000 = length is 1 x t q bit 2-0 prseg<2:0>: propagation time segment bits 111 = length is 8 x t q 000 = length is 1 x t q downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 306 ? 2013-2014 microchip technology inc. register 21-11: cxfen1: canx acceptance filter enable register 1 r/w-1 r/w-1 r/w-1 r/w-1 r/w-1 r/w-1 r/w-1 r/w-1 flten<15:8> bit 15 bit 8 r/w-1 r/w-1 r/w-1 r/w-1 r/w-1 r/w-1 r/w-1 r/w-1 flten<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 flten<15:0>: enable filter n to accept messages bits 1 = enables filter n 0 = disables filter n register 21-12: cxbufpnt1: canx filters 0-3 buffer pointer register 1 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 f3bp3 f3bp2 f3bp1 f3bp0 f2bp3 f2bp2 f2bp1 f2bp0 bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 f1bp3 f1bp2 f1bp1 f1bp0 f0bp3 f0bp2 f0bp1 f0bp0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-12 f3bp<3:0>: rx buffer mask for filter 3 bits 1111 = filter hits received in rx fifo buffer 1110 = filter hits received in rx buffer 14 0001 = filter hits received in rx buffer 1 0000 = filter hits received in rx buffer 0 bit 11-8 f2bp<3:0>: rx buffer mask for filter 2 bits (same values as bits 15-12) bit 7-4 f1bp<3:0>: rx buffer mask for filter 1 bits (same values as bits 15-12) bit 3-0 f0bp<3:0>: rx buffer mask for filter 0 bits (same values as bits 15-12) downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 307 dspic33epxxxgm3xx/6xx/7xx register 21-13: cxbufpnt2: canx filters 4-7 buffer pointer register 2 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 f7bp3 f7bp2 f7bp1 f7bp0 f6bp3 f6bp2 f6bp1 f6bp0 bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 f5bp3 f5bp2 f5bp1 f5bp0 f4bp3 f4bp2 f4bp1 f4bp0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-12 f7bp<3:0>: rx buffer mask for filter 7 bits 1111 = filter hits received in rx fifo buffer 1110 = filter hits received in rx buffer 14 0001 = filter hits received in rx buffer 1 0000 = filter hits received in rx buffer 0 bit 11-8 f6bp<3:0>: rx buffer mask for filter 6 bits (same values as bits 15-12) bit 7-4 f5bp<3:0>: rx buffer mask for filter 5 bits (same values as bits 15-12) bit 3-0 f4bp<3:0>: rx buffer mask for filter 4 bits (same values as bits 15-12) register 21-14: cxbufpnt3: canx filters 8-11 buffer pointer register 3 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 f11bp3 f11bp2 f11bp1 f11bp0 f10bp3 f10bp2 f10bp1 f10bp0 bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 f9bp3 f9bp2 f9bp1 f9bp0 f8bp3 f8bp2 f8bp1 f8bp0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-12 f11bp<3:0>: rx buffer mask for filter 11 bits 1111 = filter hits received in rx fifo buffer 1110 = filter hits received in rx buffer 14 0001 = filter hits received in rx buffer 1 0000 = filter hits received in rx buffer 0 bit 11-8 f10bp<3:0>: rx buffer mask for filter 10 bits (same values as bits 15-12) bit 7-4 f9bp<3:0>: rx buffer mask for filter 9 bits (same values as bits 15-12) bit 3-0 f8bp<3:0>: rx buffer mask for filter 8 bits (same values as bits 15-12) downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 308 ? 2013-2014 microchip technology inc. register 21-15: cxbufpnt4: canx filters 12-15 buffer pointer register 4 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 f15bp3 f15bp2 f15bp1 f15bp0 f14bp3 f14bp2 f14bp1 f14bp0 bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 f13bp3 f13bp2 f13bp1 f13bp0 f12bp3 f12bp2 f12bp1 f12bp0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-12 f15bp<3:0>: rx buffer mask for filter 15 bits 1111 = filter hits received in rx fifo buffer 1110 = filter hits received in rx buffer 14 0001 = filter hits received in rx buffer 1 0000 = filter hits received in rx buffer 0 bit 11-8 f14bp<3:0>: rx buffer mask for filter 14 bits (same values as bits 15-12) bit 7-4 f13bp<3:0>: rx buffer mask for filter 13 bits (same values as bits 15-12) bit 3-0 f12bp<3:0>: rx buffer mask for filter 12 bits (same values as bits 15-12) downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 309 dspic33epxxxgm3xx/6xx/7xx register 21-16: cxrxfnsid: canx acceptance filter n standard identifier register (n = 0-15) r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x sid10 sid9 sid8 sid7 sid6 sid5 sid4 sid3 bit 15 bit 8 r/w-x r/w-x r/w-x u-0 r/w-x u-0 r/w-x r/w-x sid2 sid1 sid0 exide e i d 1 7e i d 1 6 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-5 sid<10:0>: standard identifier bits 1 = message address bit, sidx, must be 1 to match filter 0 = message address bit, sidx, must be 0 to match filter bit 4 unimplemented: read as 0 bit 3 exide: extended identifier enable bit if mide = 1 : 1 = matches only messages with extended identifier addresses 0 = matches only messages with standard identifier addresses if mide = 0 : ignores exide bit. bit 2 unimplemented: read as 0 bit 1-0 eid<17:16>: extended identifier bits 1 = message address bit, eidx, must be 1 to match filter 0 = message address bit, eidx, must be 0 to match filter register 21-17: cxrxfneid: canx acceptance filter n extended identifier register (n = 0-15) r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x eid<15:8> bit 15 bit 8 r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x eid<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 eid<15:0>: extended identifier bits 1 = message address bit, eidx, must be 1 to match filter 0 = message address bit, eidx, must be 0 to match filter downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 310 ? 2013-2014 microchip technology inc. register 21-18: cxfmsksel1: can x filters 7-0 mask selection register 1 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 f7msk1 f7msk0 f6msk1 f6msk0 f5msk1 f5msk0 f4msk1 f4msk0 bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 f3msk1 f3msk0 f2msk1 f2msk0 f1msk1 f1msk0 f0msk1 f0msk0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-14 f7msk<1:0>: mask source for filter 7 bit 11 = reserved 10 = acceptance mask 2 registers contain mask 01 = acceptance mask 1 registers contain mask 00 = acceptance mask 0 registers contain mask bit 13-12 f6msk<1:0>: mask source for filter 6 bit (same values as bits 15-14) bit 11-10 f5msk<1:0>: mask source for filter 5 bit (same values as bits 15-14) bit 9-8 f4msk<1:0>: mask source for filter 4 bit (same values as bits 15-14) bit 7-6 f3msk<1:0>: mask source for filter 3 bit (same values as bits 15-14) bit 5-4 f2msk<1:0>: mask source for filter 2 bit (same values as bits 15-14) bit 3-2 f1msk<1:0>: mask source for filter 1 bit (same values as bits 15-14) bit 1-0 f0msk<1:0>: mask source for filter 0 bit (same values as bits 15-14) downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 311 dspic33epxxxgm3xx/6xx/7xx register 21-19: cxfmsksel2: can x filters 15-8 mask selection register 2 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 f15msk1 f15msk0 f14msk1 f14msk0 f13msk1 f13msk0 f12msk1 f12msk0 bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 f11msk1 f11msk0 f10msk1 f10msk0 f9msk1 f9msk0 f8msk1 f8msk0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-14 f15msk<1:0>: mask source for filter 15 bit 11 = reserved 10 = acceptance mask 2 registers contain mask 01 = acceptance mask 1 registers contain mask 00 = acceptance mask 0 registers contain mask bit 13-12 f14msk<1:0>: mask source for filter 14 bit (same values as bits 15-14) bit 11-10 f13msk<1:0>: mask source for filter 13 bit (same values as bits 15-14) bit 9-8 f12msk<1:0>: mask source for filter 12 bit (same values as bits 15-14) bit 7-6 f11msk<1:0>: mask source for filter 11 bit (same values as bits 15-14) bit 5-4 f10msk<1:0>: mask source for filter 10 bit (same values as bits 15-14) bit 3-2 f9msk<1:0>: mask source for filter 9 bit (same values as bits 15-14) bit 1-0 f8msk<1:0>: mask source for filter 8 bit (same values as bits 15-14) downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 312 ? 2013-2014 microchip technology inc. register 21-20: cxrxmnsid: can x acceptance filter mask n standard identifier register (n = 0-2) r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x sid10 sid9 sid8 sid7 sid6 sid5 sid4 sid3 bit 15 bit 8 r/w-x r/w-x r/w-x u-0 r/w-x u-0 r/w-x r/w-x sid2 sid1 sid0 m i d e e i d 1 7e i d 1 6 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-5 sid<10:0>: standard identifier bits 1 = includes bit, sidx, in filter comparison 0 = bit, sidx, is a dont care in filter comparison bit 4 unimplemented: read as 0 bit 3 mide: identifier receive mode bit 1 = matches only message types (standard or extended address) that correspond to the exide bit in the filter 0 = matches either standard or extended address message if filters match (i.e., if (filter sidx) = (message sidx) or if (filter sidx/eidx) = (message sidx/eidx)) bit 2 unimplemented: read as 0 bit 1-0 eid<17:16>: extended identifier bits 1 = includes bit, eidx, in filter comparison 0 = bit, eidx, is a dont care in filter comparison register 21-21: cxrxmneid: can x acceptance filter mask n extended identifier register (n = 0-2) r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x eid<15:8> bit 15 bit 8 r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x eid<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 eid<15:0>: extended identifier bits 1 = includes bit, eidx, in filter comparison 0 = bit, eidx, is a dont care in filter comparison downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 313 dspic33epxxxgm3xx/6xx/7xx register 21-22: cxrxful1: canx receive buffer full register 1 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 rxful<15:8> bit 15 bit 8 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 rxful<7:0> bit 7 bit 0 legend: c = writable bit, but only 0 can be written to clear the bit r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 rxful<15:0>: receive buffer n full bits 1 = buffer is full (set by module) 0 = buffer is empty (cleared by user software) register 21-23: cxrxful2: canx receive buffer full register 2 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 rxful<31:24> bit 15 bit 8 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 rxful<23:16> bit 7 bit 0 legend: c = writable bit, but only 0 can be written to clear the bit r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 rxful<31:16>: receive buffer n full bits 1 = buffer is full (set by module) 0 = buffer is empty (cleared by user software) downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 314 ? 2013-2014 microchip technology inc. register 21-24: cxrxovf1: canx receive buffer overflow register 1 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 rxovf<15:8> bit 15 bit 8 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 rxovf<7:0> bit 7 bit 0 legend: c = writable bit, but only 0 can be written to clear the bit r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 rxovf<15:0>: receive buffer n overflow bits 1 = module attempted to write to a full buffer (set by module) 0 = no overflow condition (cleared by user software) register 21-25: cxrxovf2: canx receive buffer overflow register 2 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 rxovf<31:24> bit 15 bit 8 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 rxovf<23:16> bit 7 bit 0 legend: c = writable bit, but only 0 can be written to clear the bit r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 rxovf<31:16>: receive buffer n overflow bits 1 = module attempted to write to a full buffer (set by module) 0 = no overflow condition (cleared by user software) downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 315 dspic33epxxxgm3xx/6xx/7xx register 21-26: cxtrmncon: canx tx/rx buffer mn control register (m = 0,2,4,6; n = 1,3,5,7) r/w-0 r-0 r-0 r-0 r/w-0 r/w-0 r/w-0 r/w-0 txenn txabtn txlarbn txerrn txreqn rtrenn txnpri1 txnpri0 bit 15 bit 8 r/w-0 r-0 r-0 r-0 r/w-0 r/w-0 r/w-0 r/w-0 txenm txabtm ( 1 ) txlarbm ( 1 ) txerrm ( 1 ) txreqm rtrenm txmpri1 txmpri0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-8 see definition for bits 7-0, controls buffer n bit 7 txenm: tx/rx buffer selection bit 1 = buffer, trbn, is a transmit buffer 0 = buffer, trbn, is a receive buffer bit 6 txabtm: message aborted bit ( 1 ) 1 = message was aborted 0 = message completed transmission successfully bit 5 txlarbm: message lost arbitration bit ( 1 ) 1 = message lost arbitration while being sent 0 = message did not lose arbitration while being sent bit 4 txerrm: error detected during transmission bit ( 1 ) 1 = a bus error occurred while the message was being sent 0 = a bus error did not occur while the message was being sent bit 3 txreqm: message send request bit 1 = requests that a message be sent; the bit automatically clears when the message is successfully sent 0 = clearing the bit to 0 while set requests a message abort bit 2 rtrenm: auto-remote transmit enable bit 1 = when a remote transmit is received, txreqx will be set 0 = when a remote transmit is received, txreqx will be unaffected bit 1-0 txmpri<1:0>: message transmission priority bits 11 = highest message priority 10 = high intermediate message priority 01 = low intermediate message priority 00 = lowest message priority note 1: this bit is cleared when txreqx is set. note: the buffers, sidx, eidx, dlcx, data field, and receive status registers, are located in dma ram. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 316 ? 2013-2014 microchip technology inc. 21.4 can message buffers can message buffers are part of ram memory. they are not can special function registers. the user application must directly write into the ram area that is configured for can message buffers. the location and size of the buffer area is defined by the user application. buffer 21-1: canx message buffer word 0 u-0 u-0 u-0 r/w-x r/w-x r/w-x r/w-x r/w-x sid10 sid9 sid8 sid7 sid6 bit 15 bit 8 r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x sid5 sid4 sid3 sid2 sid1 sid0 srr ide bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-13 unimplemented: read as 0 bit 12-2 sid<10:0>: standard identifier bits bit 1 srr: substitute remote request bit when ide = 0 : 1 = message will request remote transmission 0 = normal message when ide = 1 : the srr bit must be set to 1 . bit 0 ide: extended identifier bit 1 = message will transmit an extended identifier 0 = message will transmit a standard identifier buffer 21-2: canx message buffer word 1 u-0 u-0 u-0 u-0 r/w-x r/w-x r/w-x r/w-x e i d < 1 7 : 1 4 > bit 15 bit 8 r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x eid<13:6> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-12 unimplemented: read as 0 bit 11-0 eid<17:6>: extended identifier bits downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 317 dspic33epxxxgm3xx/6xx/7xx ( buffer 21-3: canx message buffer word 2 r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x eid5 eid4 eid3 eid2 eid1 eid0 rtr rb1 bit 15 bit 8 u-x u-x u-x r/w-x r/w-x r/w-x r/w-x r/w-x rb0 dlc3 dlc2 dlc1 dlc0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-10 eid<5:0>: extended identifier bits bit 9 rtr: remote transmission request bit when ide = 1 : 1 = message will request remote transmission 0 = normal message when ide = 0 : the rtr bit is ignored. bit 8 rb1: reserved bit 1 user must set this bit to 0 per can protocol. bit 7-5 unimplemented: read as 0 bit 4 rb0: reserved bit 0 user must set this bit to 0 per can protocol. bit 3-0 dlc<3:0>: data length code bits buffer 21-4: can x message buffer word 3 r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x byte 1<15:8> bit 15 bit 8 r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x byte 0<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-8 byte 1<15:8>: canx message byte 1 bit 7-0 byte 0<7:0>: canx message byte 0 downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 318 ? 2013-2014 microchip technology inc. buffer 21-5: can x message buffer word 4 r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x byte 3<15:8> bit 15 bit 8 r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x byte 2<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-8 byte 3<15:8>: canx message byte 3 bit 7-0 byte 2<7:0>: canx message byte 2 buffer 21-6: can x message buffer word 5 r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x byte 5<15:8> bit 15 bit 8 r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x byte 4<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-8 byte 5<15:8>: canx message byte 5 bit 7-0 byte 4<7:0>: canx message byte 4 downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 319 dspic33epxxxgm3xx/6xx/7xx buffer 21-7: can x message buffer word 6 r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x byte 7<15:8> bit 15 bit 8 r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x byte 6<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-8 byte 7<15:8>: canx message byte 7 bit 7-0 byte 6<7:0>: canx message byte 6 buffer 21-8: canx message buffer word 7 u-0 u-0 u-0 r/w-x r/w-x r/w-x r/w-x r/w-x filhit<4:0> ( 1 ) bit 15 bit 8 u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-13 unimplemented: read as 0 bit 12-8 filhit<4:0>: filter hit code bits ( 1 ) encodes number of filter that resulted in writing this buffer. bit 7-0 unimplemented: read as 0 note 1: only written by module for receive buffers, unused for transmit buffers. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 320 ? 2013-2014 microchip technology inc. notes: downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 321 dspic33epxxxgm3xx/6xx/7xx 22.0 charge time measurement unit (ctmu) the charge time measurement unit is a flexible analog module that provides accurate differential time measure- ment between pulse sources, as well as asynchronous pulse generation. its key features include: four edge input trigger sources polarity control for each edge source control of edge sequence control of response to edges precise time measurement resolution of 1 ns accurate current source suitable for capacitive measurement on-chip temperature measurement using a built-in diode together with other on-chip analog modules, the ctmu can be used to precisely measure time, measure capacitance, measure relative changes in capacitance or generate output pulses that are independent of the system clock. the ctmu module is ideal for interfacing with capacitive-based sensors. the ctmu is controlled through three registers: ctmucon1, ctmucon2 and ctmuicon. ctmucon1 and ctmucon2 enable the module and control edge source selection, edge source polarity selection and edge sequencing. the ctmuicon register controls the selection and trim of the current source. note 1: this data sheet summarizes the features of the dspic33epxxxgm3xx/6xx/7xx family of devices. it is not intended to be a comprehensive reference source. to complement the information in this data sheet, refer to the ?dspic33/pic24 fam- ily reference manual? , charge time measurement unit (ctmu) (ds70661), which is available on the microchip web site ( www.microchip.com ). 2: some registers and associated bits described in this section may not be available on all devices. refer to section 4.0 memory organization in this data sheet for device-specific register and bit information. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 322 ? 2013-2014 microchip technology inc. figure 22-1: ctmu block diagram cted1 cted2 current source edge control logic ctmucon1 or ctmucon2 pulse generator ctmui to adcx cmp1 timer1 oc1 current control itrim<5:0> irng<1:0> ctmuicon ctmu control logic edg1stat edg2stat analog-to-digital ctpls ic1 cmp1 c1in1- cdelay ctmu temp ctmu temperature sensor current control selection tgen edg1stat, edg2stat ctmu temp 0 edg1stat = edg2stat ctmui to adcx 0 edg1stat ? edg2stat ctmup 1 edg1stat ? edg2stat no connect 1 edg1stat = edg2stat trigger tgen ctmup external capacitor for pulse generation downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 323 dspic33epxxxgm3xx/6xx/7xx 22.1 ctmu control registers register 22-1: ctmucon1: ct mu control register 1 r/w-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ctmuen ctmusidl tgen edgen edgseqen idissen ( 1 ) cttrig bit 15 bit 8 u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 ctmuen: ctmu enable bit 1 = module is enabled 0 = module is disabled bit 14 unimplemented: read as 0 bit 13 ctmusidl: ctmu stop in idle mode bit 1 = discontinues module operation when device enters idle mode 0 = continues module operation in idle mode bit 12 tgen: time generation enable bit 1 = enables edge delay generation 0 = disables edge delay generation bit 11 edgen: edge enable bit 1 = hardware modules are used to trigger edges (tmrx, ctedx, etc.) 0 = software is used to trigger edges (manual set of edgxstat) bit 10 edgseqen: edge sequence enable bit 1 = edge 1 event must occur before edge 2 event can occur 0 = no edge sequence is needed bit 9 idissen: analog current source control bit ( 1 ) 1 = analog current source output is grounded 0 = analog current source output is not grounded bit 8 cttrig: adcx trigger control bit 1 = ctmu triggers adcx start of conversion 0 = ctmu does not trigger adcx start of conversion bit 7-0 unimplemented: read as 0 note 1: the adcx module sample-and-hold (s&h) capacitor is not automatically discharged between sample/conversion cycles. any software using the adcx as part of a capacitance measurement m ust discharge the adcx capacitor before conducting the measurement. the idissen bit, when set to 1 , per- forms this function. the adcx must be sampling while the idissen bit is active to connect the discharge sink to the capacitor array. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 324 ? 2013-2014 microchip technology inc. register 22-2: ctmucon2: ct mu control register 2 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 edg1mod edg1pol edg1sel3 edg1sel2 edg1sel1 edg1sel0 edg2stat edg1stat bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 u-0 u-0 edg2mod edg2pol edg2sel3 edg2sel2 edg2sel1 edg2sel0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 edg1mod: edge 1 edge sampling mode selection bit 1 = edge 1 is edge-sensitive 0 = edge 1 is level-sensitive bit 14 edg1pol: edge 1 polarity select bit 1 = edge 1 is programmed for a positive edge response 0 = edge 1 is programmed for a negative edge response bit 13-10 edg1sel<3:0>: edge 1 source select bits 1111 = f osc 1110 = osci pin 1101 = frc oscillator 1100 = reserved 1011 = internal lprc oscillator 1010 = reserved 100x = reserved 01xx = reserved 0011 = cted1 pin 0010 = cted2 pin 0001 = oc1 module 0000 = timer1 module bit 9 edg2stat: edge 2 status bit indicates the status of edge 2 and can be written to control the edge source. 1 = edge 2 has occurred 0 = edge 2 has not occurred bit 8 edg1stat: edge 1 status bit indicates the status of edge 1 and can be written to control the edge source. 1 = edge 1 has occurred 0 = edge 1 has not occurred bit 7 edg2mod: edge 2 edge sampling mode selection bit 1 = edge 2 is edge-sensitive 0 = edge 2 is level-sensitive bit 6 edg2pol: edge 2 polarity select bit 1 = edge 2 is programmed for a positive edge response 0 = edge 2 is programmed for a negative edge response note 1: if the tgen bit is set to 1 , then the cmp1 module should be selected as the edge 2 source in the edg2selx bits field; otherwise, the module will not function. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 325 dspic33epxxxgm3xx/6xx/7xx bit 5-2 edg2sel<3:0>: edge 2 source select bits 1111 = f osc 1110 = osci pin 1101 = frc oscillator 1100 = reserved 1011 = internal lprc oscillator 1010 = reserved 100x = reserved 0111 = reserved 0110 = reserved 0101 = reserved 0100 = cmp1 module ( 1 ) 0011 = cted2 pin 0010 = cted1 pin 0001 = oc1 module 0000 = ic1 module bit 1-0 unimplemented: read as 0 register 22-2: ctmucon2: ctmu control register 2 (continued) note 1: if the tgen bit is set to 1 , then the cmp1 module should be selected as the edge 2 source in the edg2selx bits field; otherwise, the module will not function. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 326 ? 2013-2014 microchip technology inc. register 22-3: ctmuicon: ctmu current control register ( 3 ) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 itrim5 itrim4 itrim3 itrim2 itrim1 itrim0 irng1 irng0 bit 15 bit 8 u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-10 itrim<5:0>: current source trim bits 011111 = maximum positive change from nominal current + 62% 011110 = maximum positive change from nominal current + 60% 000010 = minimum positive change from nominal current + 4% 000001 = minimum positive change from nominal current + 2% 000000 = nominal current output specified by irng<1:0> 111111 = minimum negative change from nominal current C 2% 111110 = minimum negative change from nominal current C 4% 100010 = maximum negative change from nominal current C 60% 100001 = maximum negative change from nominal current C 62% bit 9-8 irng<1:0>: current source range select bits 11 = 100 ? base current ( 2 ) 10 = 10 ? base current ( 2 ) 01 = base current level ( 2 ) 00 = 1000 ? base current ( 1 , 2 ) bit 7-0 unimplemented: read as 0 note 1: this current range is not available for use with the internal temperature measurement diode. 2: refer to the ctmu current source specifications ( table 33-55 ) in section 33.0 electrical characteristics for the current range selection values. 3: current sources are not generated when 12-bit adc mo de is chosen. current sources are active only when 10-bit adc mode is chosen. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 327 dspic33epxxxgm3xx/6xx/7xx 23.0 10-bit/12-bit analog-to-digital converter (adc) the dspic33epxxxgm3xx/6xx/7xx devices have two adc modules: adc1 and adc2. the adc1 supports up to 49 analog input channels, while the adc2 supports up to 32 analog input channels. on adcx, the ad12b bit (adxcon1<10>) allows each of the adc modules to be configured by the user as either a 10-bit, 4 sample-and-hold (s&h) adc (default configuration) or a 12-bit, 1 s&h adc. both adc1 and adc2 can be operated in 12-bit mode. 23.1 key features 23.1.1 10-bit adcx configuration the 10-bit adcx configuration has the following key features: successive approximation (sar) conversion conversion speeds of up to 1.1 msps up to 49 analog input pins connections to three internal op amps connections to the charge time measurement unit (ctmu) and temperature measurement diode channel selection and triggering can be controlled by the peripheral trigger generator (ptg) external voltage reference input pins simultaneous sampling of: - up to four analog input pins - three op amp outputs combinations of analog inputs and op amp outputs automatic channel scan mode selectable conversion trigger source selectable buffer fill modes four result alignment options (signed/unsigned, fractional/integer) operation during cpu sleep and idle modes 23.1.2 12-bit adcx configuration the 12-bit adcx configuration supports all the features listed above, with the exception of the following: in the 12-bit configuration, conversion speeds of up to 500 ksps are supported there is only one s&h amplifier in the 12-bit configuration; therefore, simultaneous sampling of multiple channels is not supported. analog inputs, an32-an49, are not supported the adc1 has up to 49 analog inputs. the analog inputs, an32 through an49, are multiplexed, thus providing flexibility in using any of these analog inputs in addition to the analog inputs, an0 through an31. since an32 through an49 are multiplexed, do not use two channels simultaneously, since it may result in erroneous output from the module. these analog inputs are shared with op amp inputs and outputs, comparator inputs and external voltage references. when op amp/ comparator functionality is enabled, or an external volt- age reference is used, the analog input that shares that pin is no longer available. the actual number of analog input pins, op amps and external voltage reference input configuration, depends on the specific device. a block diagram of the adcx module is shown in figure 23-1 . figure 23-2 provides a diagram of the adcx conversion clock period. note 1: this data sheet summarizes the features of the dspic33epxxxgm3xx/6xx/7xx family of devices. it is not intended to be a comprehensive reference source. to complement the information in this data sheet, refer to the ?dspic33/pic24 family reference manual , analog-to-digital converter (adc) (ds70621), which is available from the microchip web site ( www.microchip.com ). 2: some registers and associated bits described in this section may not be available on all devices. refer to section 4.0 memory organization in this data sheet for device-specific register and bit information. note: the adcx module needs to be disabled before modifying the ad12b bit. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 328 ? 2013-2014 microchip technology inc. figure 23-1: adcx module block diagram with connection opti ons for anx pins and op amps +C cmp1 /oa1 0x10 11 v refl v refl v refl + C ch0 0 1 v refl an0-anx oa1-oa3, oa5 ch0sx ch0nx ch123nx 00000 11111 a b 1 0 ch0sa<5:0> (3) ch0sb<5:0> (3) ch0sxch0nx ch0na (3) ch0nb (3) cscna ch123sx ch123nx ch123sa<2:0> ch123sb<2:0> ch123na<1:0> ch123nb<1:0> s&h1 alternate input selection channel scan this diagram depicts all of the available adcx connection options to the four s&h amplifiers, which are designated: ch0, ch1, ch2 and ch3. the anx analog pins or op amp outputs are connected to the ch0-ch3 amplifiers through the multiplexers, controlled by the sfr control bits, ch0sx, ch0nx, ch123sx and ch123nx. ab ab ab + C ch1 + C ch2 + C ch3 ch123sx +C oa2 ch123sx 0x10 11 ch123nx 0x10 11 ch123nx +C oa3 ch123sx oa2out/an0/c2in4-/c4in3-/rpi16//ra0 pgec1/oa1in+/an4/c1in3-/c1in1+/c2in3-/rpi34/rb2 pged1/oa1in-/an5/c1in1-/ctmuc/rp35/rtcc/rb3 pgec3/cv ref +/oa1out/an3/c1in4-/c4in2-/ an9/rpi27/ra11 oa2in+/an1/c2in3-/c2in1+/rpi17/ra1 an10/rpi28/ra12 pged3/oa2in-/an2/c2in1-/ss1 /rpi32/cted2/rb0 oa3in+/an8/c3in3-/c3in1+/rpi50/u1rts /bclk1/flt3/ oa3out/an6/c3in4-/c4in4-/c4in1+/rp48/ocfb/rc0 oa3in-/an7/c3in1-/c4in1-/rp49/rc1 an11/c1in2-/u1cts /flt4/pma12/rc11 oa1 v ref + (1) av dd av ss v ref - (1) vcfg<2:0> adc1buf0 (4) adc1buf1 (4) adc1buf2 (4) adc1buff (4) adc1bufe (4) from ctmu current source (ctmui) ctmu temp s&h2 s&h3 s&h0 note 1: v ref +, v ref - inputs can be multiplexed with other analog inputs. 2: channels 1, 2 and 3 are not applicable for the 12-bit mode of operation. 3: these bits can be updated with step commands from the ptg module. for more informat ion, refer to the peripheral trigger generator (ptg) chapter in the specific device data sheet. 4: when addmaen (adxcon4<8>) = 1 , enabling dma, only adcxbuf0 is used. open alts (muxa/muxb) 000001 010 011 1xx 000 001 010 011 1xx +C oa5 000001 010 011 1xx oa5in+/an24/c5in3-/c5in1+/sdo1/rp20/t1ck/ra4 tms/oa5in-/an27/c5in1-/rp41/rb9 oa5out/an25/c5in4-/rp39/int0/rb7 sar adc v refh v refl rpi33/cted1/rb1 pma13/rc2 +C downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 329 dspic33epxxxgm3xx/6xx/7xx figure 23-2: adcx conversion clock period block diagram 10 adcx conversion clock multiplier 1, 2, 3, 4, 5,..., 256 ad1con3<15> t p (1) t ad 6 ad1con3<7:0> note 1: t p = 1/f p . 2: see the adcx electrical specifications in section 33.0 electrical characteristics for the exact rc clock value. adcx internal rc clock (2) downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 330 ? 2013-2014 microchip technology inc. 23.2 adcx helpful tips 1. the smpix control bits in the adxcon2 registers: a) determine when the adcx interrupt flag is set and an interrupt is generated, if enabled. b) when the cscna bit in the adxcon2 reg- ister is set to 1 , this determines when the adcx analog scan channel list, defined in the ad1cssl/ad1cssh registers, starts over from the beginning. c) when the dma peripheral is not used (addmaen = 0 ), this determines when the adcx result buffer pointer to adc1buf0- adc1buff gets reset back to the beginning at adc1buf0. d) when the dma peripheral is used (addmaen = 1 ), this determines when the dma address pointer is incremented after a sample/conversion operation. adc1buf0 is the only adcx buffer used in this mode. the adcx result buffer pointer to adc1buf0- adc1buff gets reset back to the beginning at adc1buf0. the dma address is incre- mented after completion of every 32nd sample/conversion operation. conversion results are stored in the adc1buf0 register for transfer to ram using the dma peripheral. 2. when the dma module is disabled (addmaen = 0 ), the adcx has 16 result buffers. adcx conversion results are stored sequentially in adc1buf0-adc1buff, regardless of which analog inputs are being used subject to the smpix bits and the condition described in 1.c) above. there is no relationship between the anx input being measured and which adcx buffer (adc1buf0-adc1buff) that the conversion results will be placed in. 3. when the dma module is enabled (addmaen = 1 ), the adcx module has only 1 adcx result buffer (i.e., adc1buf0) per adcx peripheral and the adcx conversion result must be read, either by the cpu or dma controller, before the next adcx conversion is complete to avoid overwriting the previous value. 4. the done bit (adxcon1<0>) is only cleared at the start of each conversion and is set at the completion of the conversion, but remains set indefinitely, even through the next sample phase until the next conversion begins. if application code is monitoring the done bit in any kind of software loop, the user must consider this behavior because the cpu code execution is faster than the adcx. as a result, in manual sample mode, particularly where the users code is setting the samp bit (adxcon1<1>), the done bit should also be cleared by the user application just before setting the samp bit. 5. enabling op amps, comparator inputs and exter- nal voltage references can limit the availability of analog inputs (anx pins). for example, when op amp 2 is enabled, the pins for an0, an1 and an2 are used by the op amps inputs and output. this negates the usefulness of alternate input mode since the muxa selections use an0-an2. carefully study the adcx block diagram to deter- mine the configuration that will best suit your application. configuration examples are available in the ?dspic33/pic24 family reference manual? , analog-to-digital converter (adc) (ds70621) downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 331 dspic33epxxxgm3xx/6xx/7xx 23.3 adcx control registers register 23-1: adxcon1: adcx control register 1 r/w-0 u-0 r/w-0 r/w-0 u-0 r/w-0 r/w-0 r/w-0 adon adsidl addmabm ad12b form1 form0 bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0, hc, hs r/c-0, hc, hs ssrc2 ssrc1 ssrc0 ssrcg simsam asam samp done ( 2 ) bit 7 bit 0 legend: c = clearable bit u = unimplemented bit, read as 0 r = readable bit w = writable bit hs = hardware settable bit hc = hardware clearab le bit -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 adon: adcx operating mode bit 1 = adcx module is operating 0 = adcx is off bit 14 unimplemented: read as 0 bit 13 adsidl: adcx stop in idle mode bit 1 = discontinues module operation when device enters idle mode 0 = continues module operation in idle mode bit 12 addmabm: adcx dma buffer build mode bit 1 = dma buffers are written in the order of conversion; the module provides an address to the dma channel that is the same as the address used for the non-dma stand-alone buffer 0 = dma buffers are written in scatter/gather mode; the module provides a scatter/gather address to the dma channel based on the index of the analog input and the size of the dma buffer bit 11 unimplemented: read as 0 bit 10 ad12b: 10-bit or 12-bit adcx operation mode bit 1 = 12-bit, 1-channel adcx operation 0 = 10-bit, 4-channel adcx operation bit 9-8 form<1:0>: data output format bits for 10-bit operation: 11 = signed fractional (d out = sddd dddd dd00 0000 , where s = .not.d<9>) 10 = fractional (d out = dddd dddd dd00 0000 ) 01 = signed integer (d out = ssss sssd dddd dddd , where s = .not.d<9>) 00 = integer (d out = 0000 00dd dddd dddd ) for 12-bit operation: 11 = signed fractional (d out = sddd dddd dddd 0000 , where s = .not.d<11>) 10 = fractional (d out = dddd dddd dddd 0000 ) 01 = signed integer (d out = ssss sddd dddd dddd , where s = .not.d<11>) 00 = integer (d out = 0000 dddd dddd dddd ) note 1: see section 25.0 peripheral trigger generator (ptg) module for information on this selection. 2: do not clear the done bit in software if adcx sample auto-start bit is enabled (asam = 1 ). downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 332 ? 2013-2014 microchip technology inc. bit 7-5 ssrc<2:0>: sample clock source select bits if ssrcg = 1 : 111 = reserved 110 = ptgo15 primary trigger compare ends sampling and starts conversion ( 1 ) 101 = ptgo14 primary trigger compare ends sampling and starts conversion ( 1 ) 100 = ptgo13 primary trigger compare ends sampling and starts conversion ( 1 ) 011 = ptgo12 primary trigger compare ends sampling and starts conversion ( 1 ) 010 = pwm generator 3 primary trigger compare ends sampling and starts conversion 001 = pwm generator 2 primary trigger compare ends sampling and starts conversion 000 = pwm generator 1 primary trigger compare ends sampling and starts conversion if ssrcg = 0 : 111 = internal counter ends sampling and starts conversion (auto-convert) 110 = ctmu ends sampling and starts conversion 101 = pwm secondary special event trigger ends sampling and starts conversion 100 = timer5 compare ends sampling and starts conversion 011 = pwm primary special event trigger ends sampling and starts conversion 010 = timer3 compare ends sampling and starts conversion 001 = active transition on the int0 pin ends sampling and starts conversion 000 = clearing the sample bit (samp) ends sampling and starts conversion (manual mode) bit 4 ssrcg: sample trigger source group bit see ssrc<2:0> for details. bit 3 simsam: simultaneous sample select bit (only applicable when chps<1:0> = 01 or 1x ) in 12-bit mode (ad12b = 1 ), simsam is unimplemented and is read as 0 : 1 = samples ch0, ch1, ch2, ch3 simultaneously (when chps<1:0> = 1x ), or samples ch0 and ch1 simultaneously (when chps<1:0> = 01 ) 0 = samples multiple channels individually in sequence bit 2 asam: adcx sample auto-start bit 1 = sampling begins immediately after last conversion; samp bit is auto-set 0 = sampling begins when samp bit is set bit 1 samp: adcx sample enable bit 1 = adcx sample-and-hold amplifiers are sampling 0 = adcx sample-and-hold amplifiers are holding if asam = 0 , software can write 1 to begin sampling. automatically set by hardware if asam = 1 . if ssrc<2:0> = 000 , software can write 0 to end sampling and start conversion. if ssrc<2:0> ?? 000 , automatically cleared by hardware to end sampling and start conversion. bit 0 done: adcx conversion status bit ( 2 ) 1 = adcx conversion cycle is completed. 0 = adcx conversion has not started or is in progress automatically set by hardware when a/d conversion is complete. software can write 0 to clear done status (software not allowed to write 1 ). clearing this bit does not affect any operation in progress. automatically cleared by hardware at the start of a new conversion. register 23-1: adxcon1: adcx control register 1 (continued) note 1: see section 25.0 peripheral trigger generator (ptg) module for information on this selection. 2: do not clear the done bit in software if adcx sample auto-start bit is enabled (asam = 1 ). downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 333 dspic33epxxxgm3xx/6xx/7xx register 23-2: adxcon2: adcx control register 2 r/w-0 r/w-0 r/w-0 r/w-0 u-0 r/w-0 r/w-0 r/w-0 vcfg2 ( 1 ) vcfg1 ( 1 ) vcfg0 ( 1 ) offcal cscna chps1 chps0 bit 15 bit 8 r-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 bufs smpi4 smpi3 smpi2 smpi1 smpi0 bufm alts bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-13 vcfg<2:0>: converter voltage reference configuration bits ( 1 ) bit 12 offcal: offset calibration mode select bit 1 = + and C inputs of channel sample-and-hold are connected to av ss 0 = + and C inputs of channel sample-and-hold are normal bit 11 unimplemented: read as 0 bit 10 cscna: input scan select bit 1 = scans inputs for ch0+ during sample muxa 0 = does not scan inputs bit 9-8 chps<1:0>: channel select bits in 12-bit mode (ad 12b = 1 ), chps<1:0> bits are unimplemented and are read as 00 : 1x = converts ch0, ch1, ch2 and ch3 01 = converts ch0 and ch1 00 = converts ch0 bit 7 bufs: buffer fill status bit (only valid when bufm = 1 ) 1 = adcx is currently filling the second half of the buffer; the user application should access data in the first half of the buffer 0 = adcx is currently filling the first half of the buffer; the user application should access data in the second half of the buffer note 1: the 001 , 010 and 011 bit combinations for vcfg<2:0> are not applicable on adc2. 2: adc2 does not support external v ref inputs. value v refh v refl 000 a vdd a vss 001 external v ref + ( 2 ) a vss 010 a vdd external v ref - ( 2 ) 011 external v ref + ( 2 ) external v ref - ( 2 ) 1xx a vdd a vss downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 334 ? 2013-2014 microchip technology inc. bit 6-2 smpi<4:0>: increment rate bits when addmaen = 0 : x1111 = generates interrupt after completion of every 16th sample/conversion operation x1110 = generates interrupt after completion of every 15th sample/conversion operation x0001 = generates interrupt after completion of every 2nd sample/conversion operation x0000 = generates interrupt after completion of every sample/conversion operation when addmaen = 1 : 11111 = increments the dma address after completion of every 32nd sample/conversion operation 11110 = increments the dma address after completion of every 31st sample/conversion operation 00001 = increments the dma address after completion of every 2nd sample/conversion operation 00000 = increments the dma address after completion of every sample/conversion operation bit 1 bufm: buffer fill mode select bit 1 = starts buffer filling the first half of the buffer on the first interrupt and the second half of the buffer on the next interrupt 0 = always starts filling the buffer from the start address bit 0 alts: alternate input sample mode select bit 1 = uses channel input selects for sample muxa on the first sample and sample muxb on the next sample 0 = always uses channel input selects for sample muxa register 23-2: adxcon2: adcx control register 2 (continued) note 1: the 001 , 010 and 011 bit combinations for vcfg<2:0> are not applicable on adc2. 2: adc2 does not support external v ref inputs. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 335 dspic33epxxxgm3xx/6xx/7xx register 23-3: adxcon3: adcx control register 3 r/w-0 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 adrc samc4 ( 1 ) samc3 ( 1 ) samc2 ( 1 ) samc1 ( 1 ) samc0 ( 1 ) bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 adcs7 ( 2 ) adcs6 ( 2 ) adcs5 ( 2 ) adcs4 ( 2 ) adcs3 ( 2 ) adcs2 ( 2 ) adcs1 ( 2 ) adcs0 ( 2 ) bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 adrc: adcx conversion clock source bit 1 = adc x internal rc clock 0 = clock derived from system clock bit 14-13 unimplemented: read as 0 bit 12-8 samc<4:0>: auto-sample time bits ( 1 ) 11111 = 31 t ad 00001 = 1 t ad 00000 = 0 t ad bit 7-0 adcs<7:0>: adcx conversion clock select bits ( 2 ) 11111111 = t p (adcs<7:0> + 1) = t p 256 = t ad 00000010 = t p (adcs<7:0> + 1) = t p 3 = t ad 00000001 = t p (adcs<7:0> + 1) = t p 2 = t ad 00000000 = t p (adcs<7:0> + 1) = t p 1 = t ad note 1: this bit is only used if ssrc<2:0> (ad1con1<7:5>) = 111 and ssrcg (ad1con1<4>) = 0 . 2: this bit is not used if adrc (ad1con3<15>) = 1 . downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 336 ? 2013-2014 microchip technology inc. register 23-4: adxcon4: adcx control register 4 u-0 u-0 u-0 u-0 u-0 u-0 u-0 r/w-0 addmaen bit 15 bit 8 u-0 u-0 u-0 u-0 u-0 r/w-0 r/w-0 r/w-0 dmabl2 dmabl1 dmabl0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-9 unimplemented: read as 0 bit 8 addmaen: adcx dma enable bit 1 = conversion results are stored in the adc1buf0 register for transfer to ram using dma 0 = conversion results are stored in the adc1buf0 through adc1buff registers; dma will not be used bit 7-3 unimplemented: read as 0 bit 2-0 dmabl<2:0>: selects number of dma buffer locations per analog input bits 111 = allocates 128 words of buffer to each analog input 110 = allocates 64 words of buffer to each analog input 101 = allocates 32 words of buffer to each analog input 100 = allocates 16 words of buffer to each analog input 011 = allocates 8 words of buffer to each analog input 010 = allocates 4 words of buffer to each analog input 001 = allocates 2 words of buffer to each analog input 000 = allocates 1 word of buffer to each analog input downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 337 dspic33epxxxgm3xx/6xx/7xx register 23-5: adxchs123: adcx input channel 1, 2, 3 select register u-0 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ch123sb2 ch123sb1 ch123nb1 ch123nb0 ch123sb0 bit 15 bit 8 u-0 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ch123sa2 ch123sa1 ch123na1 ch123na0 ch123sa0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-13 unimplemented: read as 0 bit 12-11 ch123sb<2:1>: channels 1, 2, 3 positive input select for sample b bits 1xx = ch1 positive input is an0 (op amp 2), ch2 positive input is an25 (op amp 5), ch3 positive input is an6 (op amp 3) 011 = ch1 positive input is an3 (op amp 1), ch2 positive input is an0 (op amp 2), ch3 positive input is an25 (op amp 5) 010 = ch1 positive input is an3 (op amp 1), ch2 positive input is an0 (op amp 2), ch3 positive input is an6 (op amp 3) 001 = ch1 positive input is an3, ch2 positive input is an4, ch3 positive input is an5 000 = ch1 positive input is an0, ch2 positive input is an1, ch3 positive input is an2 bit 10-9 ch123nb<1:0>: channels 1, 2, 3 negative input select for sample b bits 11 = ch1 negative input is an9, ch2 negative input is an10, ch3 negative input is an11 10 = ch1 negative input is an6, ch2 negative input is an7, ch3 negative input is an8 0x = ch1, ch2, ch3 negative input is v refl ( 1 ) bit 8 ch123sb0: channels 1, 2, 3 positive input select for sample b bit see bits<12:11> for bit selections. bit 7-5 unimplemented: read as 0 bit 4-3 ch123sa<2:1>: channels 1, 2, 3 positive input select for sample a bits 1xx = ch1 positive input is an0 (op amp 2), ch2 positive input is an25 (op amp 5), ch3 positive input is an6 (op amp 3) 011 = ch1 positive input is an3 (op amp 1), ch2 positive input is an0 (op amp 2), ch3 positive input is an25 (op amp 5) 010 = ch1 positive input is an3 (op amp 1), ch2 positive input is an0 (op amp 2), ch3 positive input is an6 (op amp 3) 001 = ch1 positive input is an3, ch2 positive input is an4, ch3 positive input is an5 000 = ch1 positive input is an0, ch2 positive input is an1, ch3 positive input is an2 bit 2-1 ch123na<1:0>: channels 1, 2, 3 negative input select for sample a bits 11 = ch1 negative input is an9, ch2 negative input is an10, ch3 negative input is an11 10 = ch1 negative input is an6, ch2 negative input is an7, ch3 negative input is an8 0x = ch1, ch2, ch3 negative input is v refl bit 0 ch123sa0: channels 1, 2, 3 positive input select for sample a bit see bits<4:3> for the bit selections. note 1: the negative input to v refl happens only when vcfg<2:0> = 2 or 3 in the adxcon2 register. when vcfg<2:0> = 0 or 1, this negative input is internally routed to av ss . downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 338 ? 2013-2014 microchip technology inc. register 23-6: adxchs0: adcx input channel 0 select register ( 3 ) r/w-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ch0nb c h 0 s b 5 ( 1 , 4 , 5 ) ch0sb4 ( 1 , 5 ) ch0sb3 ( 1 , 5 ) ch0sb2 ( 1 , 5 ) ch0sb1 ( 1 , 5 ) ch0sb0 ( 1 , 5 ) bit 15 bit 8 r/w-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ch0na c h 0 s a 5 ( 1 , 4 , 5 ) ch0sa4 ( 1 , 5 ) ch0sa3 ( 1 , 5 ) ch0sa2 ( 1 , 5 ) ch0sa1 ( 1 , 5 ) ch0sa0 ( 1 , 5 ) bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 ch0nb: channel 0 negative input select for sample muxb bit 1 = channel 0 negative input is an1 ( 1 ) 0 = channel 0 negative input is v refl bit 14 unimplemented: read as 0 bit 13-8 ch0sb<5:0>: channel 0 positive input select for sample muxb bits ( 1 , 4 , 5 ) 111111 = channel 0 positive input is (an63) unconnected 111110 = channel 0 positive input is (an62) the ctmu temperature voltage 111101 = channel 0 positive input is (an61) reserved 110010 = channel 0 positive input is (an50) reserved 110001 = channel 0 positive input is an49 110000 = channel 0 positive input is an48 101111 = channel 0 positive input is an47 101110 = channel 0 positive input is an46 011010 = channel 0 positive input is an26 011001 = channel 0 positive input is an25 or op amp 5 output voltage ( 2 ) 011000 = channel 0 positive input is an24 000111 = channel 0 positive input is an7 000110 = channel 0 positive input is an6 or op amp 3 output voltage ( 2 ) 000101 = channel 0 positive input is an5 000100 = channel 0 positive input is an4 000011 = channel 0 positive input is an3 or op amp 1 output voltage ( 2 ) 000010 = channel 0 positive input is an2 000001 = channel 0 positive input is an1 000000 = channel 0 positive input is an0 or op amp 2 output voltage ( 2 ) note 1: an0 through an7 are repurposed when comparator and op amp functionality are enable d. see figure 23-1 to determine how enabling a particular op amp or comparator affects selection choic es for channels 1, 2 and 3. 2: if the op amp is selected (opmode bit (cmxcon<10>) = 1 ), the oax input is used; otherwise, the anx input is used. 3: see the pin diagrams section for the available analog channels for each device. 4: analog input selections for adc1 are shown here. an32-an63 selections are not available for adc2. the ch0sb5 and ch0sa5 bits are reserved for adc2 and should be programmed to 0 . 5: analog inputs, an32-an49, are available only when the adcx is working in 10-bit mode. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 339 dspic33epxxxgm3xx/6xx/7xx bit 7 ch0na: channel 0 negative input select for sample muxa bit 1 = channel 0 negative input is an1 ( 1 ) 0 = channel 0 negative input is v refl bit 6 unimplemented: read as 0 bit 5-0 ch0sa<5:0>: channel 0 positive input select for sample muxa bits ( 1 , 4 , 5 ) 111111 = channel 0 positive input is (an63) unconnected 111110 = channel 0 positive input is (an62) the ctmu temperature voltage 111101 = channel 0 positive input is (an61) reserved 110010 = channel 0 positive input is (an50) reserved 110001 = channel 0 positive input is an49 110000 = channel 0 positive input is an48 101111 = channel 0 positive input is an47 101110 = channel 0 positive input is an46 011010 = channel 0 positive input is an26 011001 = channel 0 positive input is an25 or op amp 5 output voltage ( 2 ) 011000 = channel 0 positive input is an24 000111 = channel 0 positive input is an7 000110 = channel 0 positive input is an6 or op amp 3 output voltage ( 2 ) 000101 = channel 0 positive input is an5 000100 = channel 0 positive input is an4 000011 = channel 0 positive input is an3 or op amp 1 output voltage ( 2 ) 000010 = channel 0 positive input is an2 000001 = channel 0 positive input is an1 000000 = channel 0 positive input is an0 or op amp 2 output voltage ( 2 ) register 23-6: adxchs0: adcx input channel 0 select register ( 3 ) (continued) note 1: an0 through an7 are repurposed when comparator and op amp functionality are enabled . see figure 23-1 to determine how enabling a particular op amp or comparator affects selection choice s for channels 1, 2 and 3. 2: if the op amp is selected (opmode bit (cmxcon<10>) = 1 ), the oax input is used; otherwise, the anx input is used. 3: see the pin diagrams section for the available analog channels for each device. 4: analog input selections for adc1 are shown here. an32-an63 selections are not available for adc2. the ch0sb5 and ch0sa5 bits are reserved for adc2 and should be programmed to 0 . 5: analog inputs, an32-an49, are available only when the adcx is working in 10-bit mode. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 340 ? 2013-2014 microchip technology inc. register 23-7: adxcssh: adcx input scan select register high ( 2 ) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 css31 css30 css29 css28 css27 css26 ( 1 ) css25 ( 1 ) css24 ( 1 ) bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 css23 css22 css21 css20 c ss19 css18 css17 css16 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 css31: adcx input scan selection bit 1 = selects anx for input scan 0 = skips anx for input scan bit 14 css30: adcx input scan selection bit 1 = selects anx for input scan 0 = skips anx for input scan bit 13 css29: adcx input scan selection bits 1 = selects anx for input scan 0 = skips anx for input scan bit 12 css28: adcx input scan selection bit 1 = selects anx for input scan 0 = skips anx for input scan bit 11 css27: adcx input scan selection bit 1 = selects anx for input scan 0 = skips anx for input scan bit 10 css26: adcx input scan selection bit ( 1 ) 1 = selects oa3/an6 for input scan 0 = skips oa3/an6 for input scan bit 9 css25: adcx input scan selection bit ( 1 ) 1 = selects oa2/an0 for input scan 0 = skips oa2/an0 for input scan bit 8 css24: adcx input scan selection bit ( 1 ) 1 = selects oa1/an3 for input scan 0 = skips oa1/an3 for input scan bit 7 css23: adcx input scan selection bit 1 = selects anx for input scan 0 = skips anx for input scan bit 6 css22: adcx input scan selection bits 1 = selects anx for input scan 0 = skips anx for input scan bit 5 css21: adcx input scan selection bits 1 = selects anx for input scan 0 = skips anx for input scan note 1: if the op amp is selected (opmode bit (cmxcon<10>) = 1 ), the oax input is used; otherwise, the anx input is used. 2: all bits in this register can be selected by the user application. however, inputs selected for sc an without a corresponding input on the device convert v refl . downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 341 dspic33epxxxgm3xx/6xx/7xx bit 4 css20: adcx input scan selection bit 1 = selects anx for input scan 0 = skips anx for input scan bit 3 css19: adcx input scan selection bit 1 = selects anx for input scan 0 = skips anx for input scan bit 2 css18: adcx input scan selection bit 1 = selects anx for input scan 0 = skips anx for input scan bit 1 css17: adcx input scan selection bit 1 = selects anx for input scan 0 = skips anx for input scan bit 0 css16: adcx input scan selection bit 1 = selects anx for input scan 0 = skips anx for input scan register 23-7: adxcssh: adcx input scan select register high ( 2 ) (continued) note 1: if the op amp is selected (opmode bit (cmxcon<10>) = 1 ), the oax input is used; otherwise, the anx input is used. 2: all bits in this register can be selected by the user application. however, inputs selected for sc an without a corresponding input on the device convert v refl . downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 342 ? 2013-2014 microchip technology inc. register 23-8: adxcssl: adcx input scan select register low ( 1 , 2 ) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 css<15:8> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 css<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 css<15:0>: adcx input scan selection bits 1 = selects anx for input scan 0 = skips anx for input scan note 1: on devices with less than 16 analog inputs, all bits in this register can be selected by the user applic ation. however, inputs selected for scan without a corresponding input on the device convert v refl . 2: cssx = anx, where x = 0-15. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 343 dspic33epxxxgm3xx/6xx/7xx 24.0 data converter interface (dci) module 24.1 module introduction the data converter interface (dci) module allows simple interfacing of devices, such as audio coder/ decoders (codecs), adc and d/a converters. the following interfaces are supported: framed synchronous serial transfer (single or multi-channel) inter-ic sound (i 2 s) interface ac-link compliant mode general features include: programmable word size up to 16 bits supports up to 16 time slots, for a maximum frame size of 256 bits data buffering for up to 4 samples without cpu overhead figure 24-1: dci module block diagram note 1: this data sheet is not intended to be a comprehensive reference source. to complement the information in this data sheet, refer to the ?dspic33/pic24 family reference manual? , data converter interface (dci) module (ds70356), which is available from the microchip web site ( www.microchip.com ). 2: some registers and associated bits described in this section may not be available on all devices. refer to section 4.0 memory organization in this data sheet for device-specific register and bit information. bcg control bits 16-bit data bus sample rate generator sckd fsd dci buffer frame synchronization generator control unit receive buffer registers w/shadow f p word size selection bits frame length selection bits dci mode selection bits csck cofs csdi csdo 15 0 transmit buffer registers w/shadow dci shift register downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 344 ? 2013-2014 microchip technology inc. 24.2 dci control registers register 24-1: dcicon1: dci control register 1 r/w-0 r-0 r/w-0 r-0 r/w-0 r/w-0 r/w-0 r/w-0 dcien r dcisidl r dloop csckd cscke cofsd bit 15 bit 8 r/w-0 r/w-0 r/w-0 r-0 r-0 r-0 r/w-0 r/w-0 unfm csdom djst r r r cofsm1 cofsm0 bit 7 bit 0 legend: r = reserved bit r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 dcien: dci module enable bit 1 = dci module is enabled 0 = dci module is disabled bit 14 reserved: read as 0 bit 13 dcisidl: dci stop in idle control bit 1 = module will halt in cpu idle mode 0 = module will continue to operate in cpu idle mode bit 12 reserved: read as 0 bit 11 dloop: digital loopback mode control bit 1 = digital loopback mode is enabled; csdi and csdo pins are internally connected 0 = digital loopback mode is disabled bit 10 csckd: sample clock direction control bit 1 = csck pin is an input when dci module is enabled 0 = csck pin is an output when dci module is enabled bit 9 cscke: sample clock edge control bit 1 = data changes on serial clock falling edge, sampled on serial clock rising edge 0 = data changes on serial clock rising edge, sampled on serial clock falling edge bit 8 cofsd: frame synchronization direction control bit 1 = cofs pin is an input when dci module is enabled 0 = cofs pin is an output when dci module is enabled bit 7 unfm: underflow mode bit 1 = transmits last value written to the transmit registers on a transmit underflow 0 = transmits 0 s on a transmit underflow bit 6 csdom: serial data output mode bit 1 = csdo pin will be tri-stated during disabled transmit time slots 0 = csdo pin drives 0 s during disabled transmit time slots bit 5 djst: dci data justification control bit 1 = data transmission/reception is begun during the same serial clock cycle as the frame synchronization pulse 0 = data transmission/reception is begun one serial clock cycle after the frame synchronization pulse bit 4-2 reserved: read as 0 bit 1-0 cofsm<1:0>: frame sync mode bits 11 = 20-bit ac-link mode 10 = 16-bit ac-link mode 01 = i 2 s frame sync mode 00 = multi-channel frame sync mode downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 345 dspic33epxxxgm3xx/6xx/7xx register 24-2: dcicon2: dci control register 2 r-0 r-0 r-0 r-0 r/w-0 r/w-0 r-0 r/w-0 r r r r blen1 blen0 rc o f s g 3 bit 15 bit 8 r/w-0 r/w-0 r/w-0 r-0 r/w-0 r/w-0 r/w-0 r/w-0 cofsg2 cofsg1 cofsg0 r ws3 ws2 ws1 ws0 bit 7 bit 0 legend: r = reserved bit r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-12 reserved: read as 0 bit 11-10 blen<1:0>: buffer length control bits 11 = four data words will be buffered between interrupts 10 = three data words will be buffered between interrupts 01 = two data words will be buffered between interrupts 00 = one data word will be buffered between interrupts bit 9 reserved: read as 0 bit 8-5 cofsg<3:0>: frame sync generator control bits 1111 = data frame has 16 words 0010 = data frame has 3 words 0001 = data frame has 2 words 0000 = data frame has 1 word bit 4 reserved: read as 0 bit 3-0 ws<3:0>: dci data word size bits 1111 = data word size is 16 bits 0100 = data word size is 5 bits 0011 = data word size is 4 bits 0010 = invalid selection . do not use. unexpected results may occur. 0001 = invalid selection . do not use. unexpected results may occur. 0000 = invalid selection . do not use. unexpected results may occur. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 346 ? 2013-2014 microchip technology inc. register 24-3: dcicon3: dci control register 3 r-0 r-0 r-0 r-0 r/w-0 r/w-0 r/w-0 r/w-0 r r r rb c g < 1 1 : 8 > bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 bcg<7:0> bit 7 bit 0 legend: r = reserved bit r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-12 reserved: read as 0 bit 11-0 bcg<11:0>: dci bit clock generator control bits downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 347 dspic33epxxxgm3xx/6xx/7xx register 24-4: dcistat: dci status register r-0 r-0 r-0 r-0 r-0 r-0 r-0 r-0 r r r r slot3 slot2 slot1 slot0 bit 15 bit 8 r-0 r-0 r-0 r-0 r-0 r-0 r-0 r-0 r r r r rov rful tunf tmpty bit 7 bit 0 legend: r = reserved bit r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-12 reserved: read as 0 bit 11-8 slot<3:0>: dci slot status bits 1111 = slot 15 is currently active 0010 = slot 2 is currently active 0001 = slot 1 is currently active 0000 = slot 0 is currently active bit 7-4 reserved: read as 0 bit 3 rov: receive overflow status bit 1 = a receive overflow has occurred for at least one receive register 0 = a receive overflow has not occurred bit 2 rful: receive buffer full status bit 1 = new data is available in the receive registers 0 = the receive registers have old data bit 1 tunf: transmit buffer underflow status bit 1 = a transmit underflow has occurred for at least one transmit register 0 = a transmit underflow has not occurred bit 0 tmpty: transmit buffer empty status bit 1 = the transmit registers are empty 0 = the transmit registers are not empty downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 348 ? 2013-2014 microchip technology inc. register 24-5: rscon: dci re ceive slot control register r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 rse<15:8> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 rse<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 rse<15:0>: dci receive slot enable bits 1 = csdi data is received during individual time slot n 0 = csdi data is ignored during individual time slot n register 24-6: tscon: dci tran smit slot control register r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 tse<15:8> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 tse<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 tse<15:0>: dci transmit slot enable control bits 1 = transmit buffer contents are sent during individual time slot n 0 = csdo pin is tri-stated or driven to logic 0 during the individual time slot, depending on the state of the csdom bit downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 349 dspic33epxxxgm3xx/6xx/7xx 25.0 peripheral trigger generator (ptg) module 25.1 module introduction the peripheral trigger generator (ptg) provides a means to schedule complex, high-speed peripheral operations that would be difficult to achieve using soft- ware. the ptg module uses 8-bit commands, called steps, that the user writes to the ptg queue register (ptgque0-ptque15), which performs operations, such as wait for input signal, generate output trigger and wait for timer. the ptg module has the following major features: multiple clock sources two 16-bit general purpose timers two 16-bit general limit counters configurable for rising or falling edge triggering generates processor interrupts to include: - four configurable processor interrupts - interrupt on a step event in single-step mode - interrupt on a ptg watchdog timer time-out able to receive trigger signals from these peripherals: -adc -pwm - output compare - input capture - op amp/comparator -int2 able to trigger or synchronize to these peripherals: - watchdog timer - output compare - input capture -adc -pwm - op amp/comparator note 1: this data sheet summarizes the features of the dspic33epxxxgm3xx/6xx/7xx family of devices. it is not intended to be a comprehensive reference source. to complement the information in this data sheet, refer to the ?dspic33/pic24 family reference manual? , peripheral trigger generator (ptg) (ds70669), which is available from the microchip web site ( www.microchip.com ). 2: some registers and associated bits described in this section may not be available on all devices. refer to section 4.0 memory organization in this data sheet for device-specific register and bit information. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 350 ? 2013-2014 microchip technology inc. figure 25-1: pt g block diagram 16-bit data bus ptgqptr<4:0> command decoder ptghold ptgadj ptg watchdog timer (1) ptg control logic ptgwdtif ptg general purpose timerx ptg loop counter x clock inputs f p t ad t1clk t2clk t3clk ptgclk<2:0> ptgl0<15:0> ptgtxlim<15:0> ptgcxlim<15:0> ptgbte<15:0> ptgo0 ptgsdlim<15:0> ptg step delay timer pwm oc1oc2 ic1 cmpx adc int2 ptgque0 ptgque1 ptgque6 ptgque15 ptgcon<15:0> ptg interrupts trigger outputs ad1chs0<15:0> step command step command ptgstepif trigger inputs ptgo31 ptg0if ptg3if step command step command f osc ? ptgdiv<4:0> ptgcst<15:0> note 1: this is a dedicated watchdog timer for the ptg module and is independent of the device watchdog timer. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 351 dspic33epxxxgm3xx/6xx/7xx 25.2 ptg control registers register 25-1: ptgcst: ptg control/status register r/w-0 u-0 r/w-0 r/w-0 u-0 r/w-0 r/w-0 r/w-0 ptgen ptgsidl ptgtogl p t g s w t ( 2 ) ptgssen ptgivis bit 15 bit 8 r/w-0 hs-0 u-0 u-0 u-0 u-0 r/w-0 r/w-0 ptgstrt ptgwdto p t g i t m 1 ( 1 ) ptgitm0 ( 1 ) bit 7 bit 0 legend: hs = hardware settable bit r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 ptgen: ptg module enable bit 1 = ptg module is enabled 0 = ptg module is disabled bit 14 unimplemented: read as 0 bit 13 ptgsidl: ptg stop in idle mode bit 1 = discontinues module operation when device enters idle mode 0 = continues module operation in idle mode bit 12 ptgtogl: ptg trig output toggle mode bit 1 = toggles the state of the ptgox for each execution of the ptgtrig command 0 = each execution of the ptgtrig command will generate a single ptgox pulse determined by the value in the ptgpwdx bits bit 11 unimplemented: read as 0 bit 10 ptgswt: ptg software trigger bit ( 2 ) 1 = triggers the ptg module 0 = no action (clearing this bit will have no effect) bit 9 ptgssen: ptg enable single-step bit 1 = enables single-step mode 0 = disables single-step mode bit 8 ptgivis: ptg counter/timer visibility control bit 1 = reads of the ptgsdlim, ptgcxlim or ptgtxlim registers return the current values of their corresponding counter/timer registers (ptgsd, ptgcx, ptgtx) 0 = reads of the ptgsdlim, ptgcxlim or ptgtxlim registers return the value previously written to those ptg limit registers bit 7 ptgstrt: start ptg sequencer bit 1 = starts to sequentially execute commands (continuous mode) 0 = stops executing commands bit 6 ptgwdto: ptg watchdog timer time-out status bit 1 = ptg watchdog timer has timed out 0 = ptg watchdog timer has not timed out. bit 5-2 unimplemented: read as 0 note 1: these bits apply to the ptgwhi and ptgwlo commands only. 2: this bit is only used with the ptgctrl step command software trigger option. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 352 ? 2013-2014 microchip technology inc. bit 1-0 ptgitm<1:0>: ptg input trigger command operating mode bits ( 1 ) 11 = single level detect with step delay is not executed on exit of command (regardless of ptgctrl command) 10 = single level detect with step delay is executed on exit of command 01 = continuous edge detect with step delay is not executed on exit of command (regardless of ptgctrl command) 00 = continuous edge detect with step delay is executed on exit of command register 25-1: ptgcst: ptg contro l/status register (continued) note 1: these bits apply to the ptgwhi and ptgwlo commands only. 2: this bit is only used with the ptgctrl step command software trigger option. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 353 dspic33epxxxgm3xx/6xx/7xx register 25-2: ptgcon: ptg control register r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ptgclk2 ptgclk1 ptgclk0 ptgdiv4 ptgdiv3 ptgdiv2 ptgdiv1 ptgdiv0 bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 u-0 r/w-0 r/w-0 r/w-0 ptgpwd3 ptgpwd2 ptgpwd1 ptgpwd0 ptgwdt2 ptgwdt1 ptgwdt0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-13 ptgclk<2:0>: select ptg module clock source bits 111 = reserved 110 = reserved 101 = ptg module clock source will be t3clk 100 = ptg module clock source will be t2clk 011 = ptg module clock source will be t1clk 010 = ptg module clock source will be t ad 001 = ptg module clock source will be f osc 000 = ptg module clock source will be f p bit 12-8 ptgdiv<4:0>: ptg module clock prescaler (divider) bits 11111 = divide-by-32 11110 = divide-by-31 00001 = divide-by-2 00000 = divide-by-1 bit 7-4 ptgpwd<3:0>: ptg trigger output pulse-width bits 1111 = all trigger outputs are 16 ptg clock cycles wide 1110 = all trigger outputs are 15 ptg clock cycles wide 0001 = all trigger outputs are 2 ptg clock cycles wide 0000 = all trigger outputs are 1 ptg clock cycle wide bit 3 unimplemented: read as 0 bit 2-0 ptgwdt<2:0>: select ptg watchdog timer time-out count value bits 111 = watchdog timer will time-out after 512 ptg clocks 110 = watchdog timer will time-out after 256 ptg clocks 101 = watchdog timer will time-out after 128 ptg clocks 100 = watchdog timer will time-out after 64 ptg clocks 011 = watchdog timer will time-out after 32 ptg clocks 010 = watchdog timer will time-out after 16 ptg clocks 001 = watchdog timer will time-out after 8 ptg clocks 000 = watchdog timer is disabled downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 354 ? 2013-2014 microchip technology inc. register 25-3: ptgbte: ptg bro adcast trigger enable register ( 1 , 2 ) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 adcts4 adcts3 adcts2 adcts1 ic4tss ic3tss ic2tss ic1tss bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 oc4cs oc3cs oc2cs oc1cs oc4tss oc3tss oc2tss oc1tss bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 adcts4: sample trigger ptgo15 for adcx bit 1 = generates trigger when the broadcast command is executed 0 = does not generate trigger when the broadcast command is executed bit 14 adcts3: sample trigger ptgo14 for adcx bit 1 = generates trigger when the broadcast command is executed 0 = does not generate trigger when the broadcast command is executed bit 13 adcts2: sample trigger ptgo13 for adcx bit 1 = generates trigger when the broadcast command is executed 0 = does not generate trigger when the broadcast command is executed bit 12 adcts1: sample trigger ptgo12 for adcx bit 1 = generates trigger when the broadcast command is executed 0 = does not generate trigger when the broadcast command is executed bit 11 ic4tss: trigger/synchronization source for ic4 bit 1 = generates trigger/synchronization when the broadcast command is executed 0 = does not generate trigger/synchronization when the broadcast command is executed bit 10 ic3tss: trigger/synchronization source for ic3 bit 1 = generates trigger/synchronization when the broadcast command is executed 0 = does not generate trigger/synchronization when the broadcast command is executed bit 9 ic2tss: trigger/synchronization source for ic2 bit 1 = generates trigger/synchronization when the broadcast command is executed 0 = does not generate trigger/synchronization when the broadcast command is executed bit 8 ic1tss: trigger/synchronization source for ic1 bit 1 = generates trigger/synchronization when the broadcast command is executed 0 = does not generate trigger/synchronization when the broadcast command is executed bit 7 oc4cs: clock source for oc4 bit 1 = generates clock pulse when the broadcast command is executed 0 = does not generate clock pulse when the broadcast command is executed bit 6 oc3cs: clock source for oc3 bit 1 = generates clock pulse when the broadcast command is executed 0 = does not generate clock pulse when the broadcast command is executed bit 5 oc2cs: clock source for oc2 bit 1 = generates clock pulse when the broadcast command is executed 0 = does not generate clock pulse when the broadcast command is executed note 1: this register is read-only when the ptg module is executing step commands (ptgen = 1 and ptgstrt = 1 ). 2: this register is only used with the ptgctrl option = 1111 step command. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 355 dspic33epxxxgm3xx/6xx/7xx bit 4 oc1cs: clock source for oc1 bit 1 = generates clock pulse when the broadcast command is executed 0 = does not generate clock pulse when the broadcast command is executed bit 3 oc4tss: trigger/synchronization source for oc4 bit 1 = generates trigger/synchronization when the broadcast command is executed 0 = does not generate trigger/synchronization when the broadcast command is executed bit 2 oc3tss: trigger/synchronization source for oc3 bit 1 = generates trigger/synchronization when the broadcast command is executed 0 = does not generate trigger/synchronization when the broadcast command is executed bit 1 oc2tss: trigger/synchronization source for oc2 bit 1 = generates trigger/synchronization when the broadcast command is executed 0 = does not generate trigger/synchronization when the broadcast command is executed bit 0 oc1tss: trigger/synchronization source for oc1 bit 1 = generates trigger/synchronization when the broadcast command is executed 0 = does not generate trigger/synchronization when the broadcast command is executed register 25-3: ptgbte: ptg bro adcast trigger enable register ( 1 , 2 ) (continued) note 1: this register is read-only when the ptg module is executing step commands (ptgen = 1 and ptgstrt = 1 ). 2: this register is only used with the ptgctrl option = 1111 step command. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 356 ? 2013-2014 microchip technology inc. register 25-4: ptgt0lim: ptg timer0 limit register ( 1 ) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ptgt0lim<15:8> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ptgt0lim<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 ptgt0lim<15:0>: ptg timer0 limit register bits general purpose timer0 limit register (effective only with a ptgt0 step command). note 1: this register is read-only when the ptg module is executing step commands (ptgen = 1 and ptgstrt = 1 ). register 25-5: ptgt1lim: ptg timer1 limit register ( 1 ) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ptgt1lim<15:8> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ptgt1lim<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 ptgt1lim<15:0>: ptg timer1 limit register bits general purpose timer1 limit register (effective only with a ptgt1 step command). note 1: this register is read-only when the ptg module is executing step commands (ptgen = 1 and ptgstrt = 1 ). downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 357 dspic33epxxxgm3xx/6xx/7xx register 25-6: ptgsdlim: ptg step delay limit register ( 1 , 2 ) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ptgsdlim<15:8> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ptgsdlim<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 ptgsdlim<15:0>: ptg step delay limit register bits holds a ptg step delay value, representing the number of additional ptg clocks, between the start of a step command and the completion of a step command. note 1: a base step delay of one ptg clock is added to any value written to the ptgsdlim register (step delay = (ptgsdlim) + 1). 2: this register is read-only when the ptg module is executing step commands (ptgen = 1 and ptgstrt = 1 ). register 25-7: ptgc0lim: ptg counter 0 limit register ( 1 ) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ptgc0lim<15:8> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ptgc0lim<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 ptgc0lim<15:0>: ptg counter 0 limit register bits may be used to specify the loop count for the ptgjmpc0 step command or as a limit register for the general purpose counter 0. note 1: this register is read-only when the ptg module is executing step commands (ptgen = 1 and ptgstrt = 1 ). downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 358 ? 2013-2014 microchip technology inc. register 25-8: ptgc1lim: ptg counter 1 limit register ( 1 ) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ptgc1lim<15:8> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ptgc1lim<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 ptgc1lim<15:0>: ptg counter 1 limit register bits may be used to specify the loop count for the ptgjmpc1 step command, or as a limit register for the general purpose counter 1. note 1: this register is read-only when the ptg module is executing step commands (ptgen = 1 and ptgstrt = 1 ). register 25-9: ptghold: ptg hold register ( 1 ) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ptghold<15:8> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ptghold<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 ptghold<15:0>: ptg general purpose hold register bits holds user-supplied data to be copied to the ptgtxlim, ptgcxlim, ptgsdlim or ptgl0 register with the ptgcopy command. note 1: this register is read-only when the ptg module is executing step commands (ptgen = 1 and ptgstrt = 1 ). downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 359 dspic33epxxxgm3xx/6xx/7xx register 25-10: ptgadj: ptg adjust register ( 1 ) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ptgadj<15:8> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ptgadj<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 ptgadj<15:0>: ptg adjust register bits this register holds user-supplied data to be added to the ptgtxlim, ptgcxlim, ptgsdlim or ptgl0 register with the ptgadd command. note 1: this register is read-only when the ptg module is executing step commands (ptgen = 1 and ptgstrt = 1 ). register 25-11: ptgl0: ptg literal 0 register ( 1 ) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ptgl0<15:8> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ptgl0<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 ptgl0<15:0>: ptg literal 0 register bits this register holds the 16-bit value to be written to the ad1chs0 register with the ptgctrl step command. note 1: this register is read-only when the ptg module is executing step commands (ptgen = 1 and ptgstrt = 1 ). downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 360 ? 2013-2014 microchip technology inc. register 25-12: ptgqptr: ptg step queue pointer register ( 1 ) u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 15 bit 8 u-0 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 p t g q p t r < 4 : 0 > bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-5 unimplemented: read as 0 bit 4-0 ptgqptr<4:0>: ptg step queue pointer register bits this register points to the currently active step command in the step queue. note 1: this register is read-only when the ptg module is executing step commands (ptgen = 1 and ptgstrt = 1 ). register 25-13: ptgquex: ptg step queue register x (x = 0-15) ( 1 , 3 ) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 step(2x + 1)<7:0> ( 2 ) bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 step(2x)<7:0> ( 2 ) bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-8 step(2x + 1)<7:0>: ptg step queue pointer register bits ( 2 ) a queue location for storage of the step(2x +1) command byte. bit 7-0 step(2x)<7:0>: ptg step queue pointer register bits ( 2 ) a queue location for storage of the step(2x) command byte. note 1: this register is read-only when the ptg module is executing step commands (ptgen = 1 and ptgstrt = 1 ). 2: refer to table 25-1 for the step command encoding. 3: the step registers maintain their values on any type of reset. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 361 dspic33epxxxgm3xx/6xx/7xx 25.3 step commands and format table 25-1: ptg step command format step command byte: stepx<7:0> cmd<3:0> option<3:0> bit 7 bit 4 bit 3 bit 0 bit 7-4 cmd<3:0> step command command description 0000 ptgctrl execute control command as described by option<3:0> 0001 ptgadd add contents of ptgadj register to target register as described by option<3:0> ptgcopy copy contents of ptghold register to target register as described by option<3:0> 001x ptgstrb copy the value contained in cmd0:option<3:0> to the ch0sa<4:0> bits (ad1chs0<4:0>) 0100 ptgwhi wait for a low-to-high edge input from selected ptg trigger input as described by option<3:0> 0101 ptgwlo wait for a high-to-low edge input from selected ptg trigger input as described by option<3:0> 0110 reserved reserved 0111 ptgirq generate individual interrupt request as described by option<3:0> 100x ptgtrig generate individual trigger output as described by <:option<3:0>> 101x ptgjmp copy the value indicated in <:option<3:0>> to the queue pointer (ptgqptr) and jump to that step queue 110x ptgjmpc0 ptgc0 = ptgc0lim: increment the queue pointer (ptgqptr) ptgc0 ? ptgc0lim: increment counter 0 (ptgc0) and copy the value indicated in <:option<3:0>> to the queue pointer (ptgqptr) and jump to that step queue 111x ptgjmpc1 ptgc1 = ptgc1lim: increment the queue pointer (ptgqptr) ptgc1 ? ptgc1lim: increment counter 1 (ptgc1) and copy the value indicated in <:option<3:0>> to the queue pointer (ptgqptr) and jump to that step queue note 1: all reserved commands or options will execute but have no effect (i.e., execute as a nop instruction). 2: refer to table 25-2 for the trigger output descriptions. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 362 ? 2013-2014 microchip technology inc. table 25-1: ptg step command format (continued) bit 3-0 step command option<3:0> option description ptgctrl ( 1 ) 0000 reserved 0001 reserved 0010 disable step delay timer (ptgsd) 0011 reserved 0100 reserved 0101 reserved 0110 enable step delay timer (ptgsd) 0111 reserved 1000 start and wait for the ptg timer0 to match timer0 limit register 1001 start and wait for the ptg timer1 to match timer1 limit register 1010 reserved 1011 wait for software trigger bit transition from low-to-high before continuing (ptgswt = 0 to 1 ) 1100 copy contents of the counter 0 register to the ad1chs0 register 1101 copy contents of the counter 1 register to the ad1chs0 register 1110 copy contents of the literal 0 register to the ad1chs0 register 1111 generate the triggers indicated in the ptg broadcast trigger enable register (ptgbte) ptgadd ( 1 ) 0000 add contents of ptgadj register to the counter 0 limit register (ptgc0lim) 0001 add contents of ptgadj register to the counter 1 limit register (ptgc1lim) 0010 add contents of ptgadj register to the timer0 limit register (ptgt0lim) 0011 add contents of ptgadj register to the timer1 limit register (ptgt1lim) 0100 add contents of ptgadj register to the step delay limit register (ptgsdlim) 0101 add contents of ptgadj register to the literal 0 register (ptgl0) 0110 reserved 0111 reserved ptgcopy ( 1 ) 1000 copy contents of ptghold register to the counter 0 limit register (ptgc0lim) 1001 copy contents of ptghold register to the counter 1 limit register (ptgc1lim) 1010 copy contents of ptghold register to the timer0 limit register (ptgt0lim) 1011 copy contents of ptghold register to the timer1 limit register (ptgt1lim) 1100 copy contents of ptghold register to the step delay limit register (ptgsdlim) 1101 copy contents of ptghold register to the literal 0 register (ptgl0) 1110 reserved 1111 reserved note 1: all reserved commands or options will execute but have no effect (i.e., execute as a nop instruction). 2: refer to table 25-2 for the trigger output descriptions. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 363 dspic33epxxxgm3xx/6xx/7xx table 25-1: ptg step command format (continued) bit 3-0 step command option<3:0> option description ptgwhi ( 1 ) or ptgwlo ( 1 ) 0000 pwm special event trigger 0001 pwm master time base synchronization output 0010 pwm1 interrupt 0011 pwm2 interrupt 0100 pwm3 interrupt 0101 pwm4 interrupt 0110 pwm5 interrupt 0111 oc1 trigger event 1000 oc2 trigger event 1001 ic1 trigger event 1010 cmp1 trigger event 1011 cmp2 trigger event 1100 cmp3 trigger event 1101 cmp4 trigger event 1110 adc conversion done interrupt 1111 int2 external interrupt ptgirq ( 1 ) 0000 generate ptg interrupt 0 0001 generate ptg interrupt 1 0010 generate ptg interrupt 2 0011 generate ptg interrupt 3 0100 reserved 1111 reserved ptgtrig ( 2 ) 00000 ptgo0 00001 ptgo1 11110 ptgo30 11111 ptgo31 note 1: all reserved commands or options will execute but have no effect (i.e., execute as a nop instruction). 2: refer to table 25-2 for the trigger output descriptions. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 364 ? 2013-2014 microchip technology inc. table 25-2: ptg output descriptions ptg output number ptg output description ptgo0 trigger/synchronization source for oc1 ptgo1 trigger/synchronization source for oc2 ptgo2 trigger/synchronization source for oc3 ptgo3 trigger/synchronization source for oc4 ptgo4 clock source for oc1 ptgo5 clock source for oc2 ptgo6 clock source for oc3 ptgo7 clock source for oc4 ptgo8 trigger/synchronization source for ic1 ptgo9 trigger/synchronization source for ic2 ptgo10 trigger/synchronization source for ic3 ptgo11 trigger/synchronization source for ic4 ptgo12 sample trigger for adc ptgo13 sample trigger for adc ptgo14 sample trigger for adc ptgo15 sample trigger for adc ptgo16 pwm time base synchronous source for pwm ptgo17 pwm time base synchronous source for pwm ptgo18 mask input select for op amp/comparator ptgo19 mask input select for op amp/comparator ptgo20 reserved ptgo21 reserved ptgo22 reserved ptgo23 reserved ptgo24 reserved ptgo25 reserved ptgo26 reserved ptgo27 reserved ptgo28 reserved ptgo29 reserved ptgo30 ptg output to pps input selection ptgo31 ptg output to pps input selection downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 365 dspic33epxxxgm3xx/6xx/7xx 26.0 op amp/comparator module the dspic33epxxxgm3xx/6xx/7xx devices contain up to five comparators that can be configured in various ways. comparators, cmp1, cmp2, cmp3 and cmp5, also have the option to be configured as op amps, with the output being brought to an external pin for gain/ filtering connections. as shown in figure 26-1 , individual comparator options are s pecified by the comparator modules special function register (sfr) control bits. these options allow users to: select the edge for trigger and interrupt generation configure the comparator voltage reference configure output blanking and masking configure as a comparator or op amp (cmp1, cmp2, cmp3 and cmp5 only) figure 26-1: op amp/comparator x module block diagram note 1: this data sheet summarizes the features of the dspic33epxxxgm3xx/6xx/7xx family of devices. it is not intended to be a comprehensive reference source. to complement the information in this data sheet, refer to the ?dspic33/pic24 family reference manual , op amp/ comparator (ds70000357), which is available from the microchip web site ( www.microchip.com ). 2: some registers and associated bits described in this section may not be available on all devices. refer to section 4.0 memory organization in this data sheet for device-specific register and bit information. note: not all op amp/comparator input/output connections are available on all devices. see the pin diagrams section for available connections. blanking function digital filter cxout (1) (see figure 26-3 ) (see figure 26-4 ) cmp4 blanking function digital filter (see figure 26-3 ) (see figure 26-4 ) C+ v in + ptg trigger input c4out (1) trigger output 01 0010 op amp/comparator 1, 2, 3, 5 comparator 4 c4in1+ cv refin v in - 01 1100 cch<1:0> (cm4con<1:0>) oa3/an6 c4in1- cref (cmxcon<4>) 0110 oa1/an3 oa2/an0 (x = 1, 2, 3, 5) cxin1+ cv refin cxin1- c x in3- cmpx C+ v in - v in + cch<1:0> (cmxcon<1:0>) cref (cmxcon<4>) op amp/comparator op amp x C+ oax oaxout opmode (cmxcon<10>) (to adcx) 01 cxin2- 11 c x in4- note 1: the cxout pin is not a dedicated output pin on the device. this must be mapped to a physical pin using peripheral pin select (pps). refer to section 11.0 i/o ports for more information. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 366 ? 2013-2014 microchip technology inc. figure 26-2: op amp/comparator voltage reference block diagram 16-to-1 mux r cvren cvrss = 0 av dd v ref + cvrss = 1 8r rr r r r r 16 steps cvrr0 cv ref1o cvr3 cvr2 cvr1 cvr0 cvr1con<3:0> cv rsrc cv refin vrefsel 10 16-to-1 mux r cvren cvrss = 0 av dd v ref + cvrss = 1 8r rr r r r r 16 steps cvrr0 cv ref2o cvr3 cvr2 cvr1 cvr0 cvr2con<3:0> cvroe vrefsel 01 8r cvrr1 av ss av ss cvrr1 cv rsrc 8r cvroe (cvr1con<4>) (cvr1con<4>) (cvr1con<7>) (cvr1con<11>) (cvr1con<5>) (cvr2con<4>) (cvr2con<4>) (cvr2con<4>) (cvr2con<11>) (cvr2con<5>) (cvr1con<6>) (cvr2con<10>) (cvr2con<6>) (cvr1con<10>) downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 367 dspic33epxxxgm3xx/6xx/7xx figure 26-3: user-programmable blanking function block diagram figure 26-4: digital filter interconnect block diagram selsrca<3:0> selsrcb<3:0> selsrcc<3:0> and cmxmskcon mux a mai mbi mci comparator output to d i g i t a l signals filter or blanking blanking blanking signals signals andi mask and-or function hlms mux b mux c blanking logic (cmxmskcon<15) (cmxmsksrc<11:8) (cmxmsksrc<7:4) (cmxmsksrc<3:0>) mbi mci mai mbi mci mai c x out cfltren digital filter txclk (1,2) synco1 (3) f p (4) f osc (4) cfsel<2:0> ? ? cfdiv note 1: see the type c timer block diagram ( figure 13-2 ). 2: see the type b timer block diagram ( figure 13-1 ). 3: see the pwmx module register interconnect diagram ( figure 16-2 ). 4: see the oscillator system diagram ( figure 9-1 ). from blanking logic 1xx 010 000 001 1 0 (cm xfltr<6:4>) (cm xfltr<3>) downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 368 ? 2013-2014 microchip technology inc. 26.1 op amp application considerations there are two configurations to take into consider- ation when designing with the op amp modules that are available in the dspic33epxxxgm3xx/6xx/7xx devices. configuration a (see figure 26-5 ) takes advantage of the internal connection to the adcx module to route the output of the op amp directly to the adcx for measurement. configuration b (see figure 26-6 ) requires that the designer externally route the output of the op amp (oaxout) to a separate ana- log input pin (any) on the device. table 33-53 in section 33.0 electrical characteristics describes the performance characteristics for the op amps, distin- guishing between the two configuration types where applicable. 26.1.1 op amp configuration a figure 26-5 shows a typical inverting amplifier circuit taking advantage of the internal connections from the op amp output to the input of the adcx. the advantage of this configuration is that the user does not need to con- sume another analog input (any) on the device, and allows the user to simultaneously sample all three op amps with the adcx module, if needed. however, the presence of the internal resistance, r int 1, adds an error in the feedback path. since r int 1 is an internal resis- tance, in relation to the op amp output (v oa x out ) and adcx internal connection (v adc ), r int 1 must be included in the numerator term of the transfer function. see table 33-52 in section 33.0 electrical character- istics for the typical value of r int 1. table 33-57 and table 33-58 in section 33.0 electrical characteris- tics describe the minimum sample time (t samp ) requirements for the adcx module in this configuration. figure 26-5 also defines the equations that should be used when calculating the expected voltages at points, v adc and v oaxout . figure 26-5: op amp configuration a C+ cxin1- cxin1+ r 1 adcx (3) oaxout r int 1 (1) r feedback (2) oax (to adcx) op amp x note 1: see table 33-56 for the typical value. 2: see table 33-52 for the minimum value for the feedback resistor. 3: see table 33-59 and table 33-60 for the minimum sample time (t samp ). 4: cv ref1o or cv ref2o are two options that are available for supplying bias voltage to the op amps. v in v adc (v oa x out ) v oaxout r feedback r 1 ----------------------------- - ?? ?? bias voltage v ? in ?? = v adc r feedback r int 1 + r 1 -------------------------------------------------- - ?? ?? bias voltage v ? in ?? = bias voltage (4) downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 369 dspic33epxxxgm3xx/6xx/7xx 26.1.2 op amp configuration b figure 26-6 shows a typical inverting amplifier circuit with the output of the op amp (oaxout) externally routed to a separate analog input pin (any) on the device. this op amp configuration is slightly different in terms of the op amp output and the adcx input connection, therefore, r int 1 is not included in the transfer function. however, this configuration requires the designer to externally route the op amp output (oaxout) to another analog input pin (any). see table 33-52 in section 33.0 elec- trical characteristics for the typical value of r int 1. table 33-57 and table 33-58 in section 33.0 electrical characteristics describe the minimum sample time (t samp ) requirements for the adcx module in this configuration. figure 26-6 also defines the equation to be used to calculate the expected voltage at point, v oa x out . this is the typical inverting amplifier equation. 26.2 op amp/comparator resources many useful resources are provided on the main prod- uct page of the microchip web site for the devices listed in this data sheet. this product page, which can be accessed using this link , contains the latest updates and additional information. 26.2.1 key resources op amp/comparator (ds70000357) in the ?dspic33/pic24 family reference manual? code samples application notes software libraries webinars all related ?dspic33/pic24 family reference manual? sections development tools figure 26-6: op amp configuration b note: in the event you are not able to access the product page using the link above, enter this url in your browser: http://www.microchip.com/wwwproducts/ devices.aspx?ddocname=en555464 adcx (3) oaxout r feedback (2) any note 1: see table 33-56 for the typical value. 2: see table 33-52 for the minimum value for the feedback resistor. 3: see table 33-59 and table 33-60 for the minimum sample time (t samp ). 4: cv ref1o or cv ref2o are two options that are available for supplying bias voltage to the op amps. C+ op amp x (v oa x out ) r int 1 (1) v oaxout r feedback r 1 ----------------------------- - ?? ?? bias voltage v ? in ?? = cxin1- cxin1+ r 1 v in bias voltage (4) downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 370 ? 2013-2014 microchip technology inc. 26.3 op amp/comparator control registers register 26-1: cmstat: op amp/comparator status register r/w-0 u-0 u-0 r-0 r-0 r-0 r-0 r-0 psidl c 5 e v t ( 1 ) c4evt ( 1 ) c3evt ( 1 ) c2evt ( 1 ) c1evt ( 1 ) bit 15 bit 8 u-0 u-0 u-0 r-0 r-0 r-0 r-0 r-0 c 5 o u t ( 2 ) c4out ( 2 ) c3out ( 2 ) c2out ( 2 ) c1out ( 2 ) bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 psidl: op amp/comparator stop in idle mode bit 1 = discontinues operation of all op amps/comparators when device enters idle mode 0 = continues operation of all op amps/comparators in idle mode bit 14-13 unimplemented: read as 0 bit 12 c5evt:c1evt: op amp/comparator 1-5 event status bit ( 1 ) 1 = op amp/comparator event occurred 0 = op amp/comparator event did not occur bit 7-5 unimplemented: read as 0 bit 4-0 c5out:c1out: op amp/comparator 1-5 output status bit ( 2 ) when cpol = 0 : 1 = v in + > v in - 0 = v in + < v in - when cpol = 1 : 1 = v in + < v in - 0 = v in + > v in - note 1: reflects the value of the of the cevt bit in the respective op amp/comparator x control register, cmxcon<9>. 2: reflects the value of the cout bit in the respective op amp/comparator x control register, cmxcon<8 >. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 371 dspic33epxxxgm3xx/6xx/7xx register 26-2: cmxcon: op amp/comparator x control register (x = 1, 2, 3 or 5) r/w-0 r/w-0 r/w-0 u-0 u-0 r/w-0 r/w-0 r/w-0 con coe cpol o p m o d e ( 2 ) cevt ( 3 ) cout bit 15 bit 8 r/w-0 r/w-0 u-0 r/w-0 u-0 u-0 r/w-0 r/w-0 evpol1 ( 3 ) evpol0 ( 3 ) c r e f ( 1 ) cch1 ( 1 ) cch0 ( 1 ) bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 con: op amp/comparator enable bit 1 = comparator is enabled 0 = comparator is disabled bit 14 coe: comparator output enable bit 1 = comparator output is present on the cxout pin 0 = comparator output is internal only bit 13 cpol: comparator output polarity select bit 1 = comparator output is inverted 0 = comparator output is not inverted bit 12-11 unimplemented: read as 0 bit 10 opmode: op amp select bit ( 2 ) 1 = op amp is enabled 0 = op amp is disabled bit 9 cevt: comparator event bit ( 3 ) 1 = comparator event, according to the evpol<1:0> settings, occurred; disables future triggers and interrupts until the bit is cleared 0 = comparator event did not occur bit 8 cout: comparator output bit when cpol = 0 (non-inverted polarity): 1 = v in + > v in - 0 = v in + < v in - when cpol = 1 (inverted polarity): 1 = v in + < v in - 0 = v in + > v in - note 1: inputs that are selected and not available will be tied to v ss . see the pin diagrams section for available inputs for each package. 2: the op amp and the comparator can be used simultaneously in these devices. the opmode bit only enables the op amp while the comparator is still functional. 3: after configuring the comparator, either for a high-to-low or low-to-high cout transition (evpol<1:0> (cmxcon<7:6>) = 10 or 01 ), the comparator event bit, cevt (cmxcon<9>), and the comparator combined interrupt flag, cmpif (ifs1<2>), must be cleared before enabling the comparator interrupt enable bit, cmpie (iec1<2>). downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 372 ? 2013-2014 microchip technology inc. bit 7-6 evpol<1:0>: trigger/event/interrupt polarity select bits ( 3 ) 11 = trigger/event/interrupt generated on any change of the comparator output (while cevt = 0 ) 10 = trigger/event/interrupt generated only on high-to-low transition of the polarity selected comparator output (while cevt = 0 ) if cpol = 1 (inverted polarity): low-to-high transition of the comparator output. if cpol = 0 (non-inverted polarity): high-to-low transition of the comparator output. 01 = trigger/event/interrupt generated only on low-to-hi gh transition of the polarity selected comparator output (while cevt = 0 ) if cpol = 1 (inverted polarity): high-to-low transition of the comparator output. if cpol = 0 (non-inverted polarity): low-to-high transition of the comparator output. 00 = trigger/event/interrupt generation is disabled. bit 5 unimplemented: read as 0 bit 4 cref: comparator reference select bit (v in + input) ( 1 ) 1 = v in + input connects to internal cv refin voltage 0 = v in + input connects to cxin1+ pin bit 3-2 unimplemented: read as 0 bit 1-0 cch<1:0>: op amp/comparator channel select bits ( 1 ) 11 = inverting input of op amp/comparator connects to cxin4- pin 10 = inverting input of op amp/comparator connects to cxin3- pin 01 = inverting input of op amp/comparator connects to cxin2- pin 00 = inverting input of op amp/comparator connects to cxin1- pin register 26-2: cmxcon: op amp/comparator x control register (x = 1, 2, 3 or 5) (continued) note 1: inputs that are selected and not available will be tied to v ss . see the pin diagrams section for available inputs for each package. 2: the op amp and the comparator can be used simultaneously in these devices. the opmode bit only enables the op amp while the comparator is still functional. 3: after configuring the comparator, either for a high-to-low or low-to-high cout transition (evpol<1:0> (cmxcon<7:6>) = 10 or 01 ), the comparator event bit, cevt (cmxcon<9>), and the comparator combined interrupt flag, cmpif (ifs1<2>), must be cleared before enabling the comparator interrupt enable bit, cmpie (iec1<2>). downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 373 dspic33epxxxgm3xx/6xx/7xx register 26-3: cm4con: op amp/ comparator 4 control register r/w-0 r/w-0 r/w-0 u-0 u-0 u-0 r/w-0 r/w-0 con coe cpol cevt ( 2 ) cout bit 15 bit 8 r/w-0 r/w-0 u-0 r/w-0 u-0 u-0 r/w-0 r/w-0 evpol1 ( 2 ) evpol0 ( 2 ) c r e f ( 1 ) cch1 ( 1 ) cch0 ( 1 ) bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 con: op amp/comparator enable bit 1 = comparator is enabled 0 = comparator is disabled bit 14 coe: comparator output enable bit 1 = comparator output is present on the cxout pin 0 = comparator output is internal only bit 13 cpol: comparator output polarity select bit 1 = comparator output is inverted 0 = comparator output is not inverted bit 12-10 unimplemented: read as 0 bit 9 cevt: comparator event bit ( 2 ) 1 = comparator event, according to the evpol<1:0> settings, occurred; disables future triggers and interrupts until the bit is cleared 0 = comparator event did not occur bit 8 cout: comparator output bit when cpol = 0 (non-inverted polarity): 1 = v in + > v in - 0 = v in + < v in - when cpol = 1 (inverted polarity): 1 = v in + < v in - 0 = v in + > v in - note 1: inputs that are selected and not available will be tied to v ss . see the pin diagrams section for available inputs for each package. 2: after configuring the comparator, either for a high-to-low or low-to-high cout transition (evpol<1:0> (cmxcon<7:6>) = 10 or 01 ), the comparator event bit, cevt (cmxcon<9>), and the comparator combined interrupt flag, cmpif (ifs1<2>), must be cleared before enabling the comparator interrupt enable bit, cmpie (iec1<2>). downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 374 ? 2013-2014 microchip technology inc. bit 7-6 evpol<1:0>: trigger/event/interrupt polarity select bits ( 2 ) 11 = trigger/event/interrupt generated on any change of the comparator output (while cevt = 0 ) 10 = trigger/event/interrupt generated only on high-to-low transition of the polarity selected comparator output (while cevt = 0 ) if cpol = 1 (inverted polarity): low-to-high transition of the comparator output. if cpol = 0 (non-inverted polarity): high-to-low transition of the comparator output. 01 = trigger/event/interrupt generated only on low-to-hi gh transition of the polarity selected comparator output (while cevt = 0 ) if cpol = 1 (inverted polarity): high-to-low transition of the comparator output. if cpol = 0 (non-inverted polarity): low-to-high transition of the comparator output. 00 = trigger/event/interrupt generation is disabled bit 5 unimplemented: read as 0 bit 4 cref: comparator reference select bit (v in + input) ( 1 ) 1 = v in + input connects to internal cv refin voltage 0 = v in + input connects to c4in1+ pin bit 3-2 unimplemented: read as 0 bit 1-0 cch<1:0>: comparator channel select bits ( 1 ) 11 = v in - input of comparator connects to oa3/an6 10 = v in - input of comparator connects to oa2/an0 01 = v in - input of comparator connects to oa1/an3 00 = v in - input of comparator connects to c4in1- register 26-3: cm4con: op amp/comparat or 4 control register (continued) note 1: inputs that are selected and not available will be tied to v ss . see the pin diagrams section for available inputs for each package. 2: after configuring the comparator, either for a high-to-low or low-to-high cout transition (evpol<1:0> (cmxcon<7:6>) = 10 or 01 ), the comparator event bit, cevt (cmxcon<9>), and the comparator combined interrupt flag, cmpif (ifs1<2>), must be cleared before enabling the comparator interrupt enable bit, cmpie (iec1<2>). downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 375 dspic33epxxxgm3xx/6xx/7xx register 26-4: cmxmsksrc: comparator x mask source select control register u-0 u-0 u-0 u-0 r/w-0 r/w-0 r/w-0 rw-0 selsrcc3 selsrcc2 selsrcc1 selsrcc0 bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 selsrcb3 selsrcb2 selsrcb1 selsrcb0 selsrca3 selsrca2 selsrca1 selsrca0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-12 unimplemented: read as 0 bit 11-8 selsrcc<3:0>: mask c input select bits 1111 = flt4 1110 = flt2 1101 = ptgo19 1100 = ptgo18 1011 = pwm6h 1010 = pwm6l 1001 = pwm5h 1000 = pwm5l 0111 = pwm4h 0110 = pwm4l 0101 = pwm3h 0100 = pwm3l 0011 = pwm2h 0010 = pwm2l 0001 = pwm1h 0000 = pwm1l bit 7-4 selsrcb<3:0>: mask b input select bits 1111 = flt4 1110 = flt2 1101 = ptgo19 1100 = ptgo18 1011 = pwm6h 1010 = pwm6l 1001 = pwm5h 1000 = pwm5l 0111 = pwm4h 0110 = pwm4l 0101 = pwm3h 0100 = pwm3l 0011 = pwm2h 0010 = pwm2l 0001 = pwm1h 0000 = pwm1l downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 376 ? 2013-2014 microchip technology inc. bit 3-0 selsrca<3:0>: mask a input select bits 1111 = flt4 1110 = flt2 1101 = ptgo19 1100 = ptgo18 1011 = pwm6h 1010 = pwm6l 1001 = pwm5h 1000 = pwm5l 0111 = pwm4h 0110 = pwm4l 0101 = pwm3h 0100 = pwm3l 0011 = pwm2h 0010 = pwm2l 0001 = pwm1h 0000 = pwm1l register 26-4: cmxmsksrc: comparator x mask source select control register (continued) downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 377 dspic33epxxxgm3xx/6xx/7xx register 26-5: cmxmskcon: comparator x mask gating control register r/w-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 hlms ocen ocnen oben obnen oaen oanen bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 nags pags acen acnen aben abnen aaen aanen bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 hlms: high or low-level masking select bit 1 = the masking (blanking) function will prevent any asserted ( 0 ) comparator signal from propagating 0 = the masking (blanking) function will prevent any asserted ( 1 ) comparator signal from propagating bit 14 unimplemented: read as 0 bit 13 ocen: or gate c input enable bit 1 = mci is connected to the or gate 0 = mci is not connected to the or gate bit 12 ocnen: or gate c input inverted enable bit 1 = inverted mci is connected to the or gate 0 = inverted mci is not connected to the or gate bit 11 oben: or gate b input enable bit 1 = mbi is connected to the or gate 0 = mbi is not connected to the or gate bit 10 obnen: or gate b input inverted enable bit 1 = inverted mbi is connected to the or gate 0 = inverted mbi is not connected to the or gate bit 9 oaen: or gate a input enable bit 1 = mai is connected to the or gate 0 = mai is not connected to the or gate bit 8 oanen: or gate a input inverted enable bit 1 = inverted mai is connected to the or gate 0 = inverted mai is not connected to the or gate bit 7 nags: and gate output inverted enable bit 1 = inverted andi is connected to the or gate 0 = inverted andi is not connected to the or gate bit 6 pags: and gate output enable bit 1 = andi is connected to the or gate 0 = andi is not connected to the or gate bit 5 acen: and gate c input enable bit 1 = mci is connected to the and gate 0 = mci is not connected to the and gate bit 4 acnen: and gate c input inverted enable bit 1 = inverted mci is connected to the and gate 0 = inverted mci is not connected to the and gate downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 378 ? 2013-2014 microchip technology inc. bit 3 aben: and gate b input enable bit 1 = mbi is connected to the and gate 0 = mbi is not connected to the and gate bit 2 abnen: and gate b input inverted enable bit 1 = inverted mbi is connected to the and gate 0 = inverted mbi is not connected to the and gate bit 1 aaen: and gate a input enable bit 1 = mai is connected to the and gate 0 = mai is not connected to the and gate bit 0 aanen: and gate a input inverted enable bit 1 = inverted mai is connected to the and gate 0 = inverted mai is not connected to the and gate register 26-5: cmxmskcon: comparator x mask gating control register (continued) downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 379 dspic33epxxxgm3xx/6xx/7xx register 26-6: cmxfltr: comparat or x filter control register u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 15 bit 8 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 cfsel2 cfsel1 cfsel0 cfltren cfdiv2 cfdiv1 cfdiv0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-7 unimplemented: read as 0 bit 6-4 cfsel<2:0>: comparator filter input clock select bits 111 = t5clk ( 1 ) 110 = t4clk ( 2 ) 101 = t3clk ( 1 ) 100 = t2clk ( 2 ) 011 = synco2 010 = synco1 ( 3 ) 001 = f osc ( 4 ) 000 = f p ( 4 ) bit 3 cfltren: comparator filter enable bit 1 = digital filter is enabled 0 = digital filter is disabled bit 2-0 cfdiv<2:0>: comparator filter clock divide select bits 111 = clock divide 1:128 110 = clock divide 1:64 101 = clock divide 1:32 100 = clock divide 1:16 011 = clock divide 1:8 010 = clock divide 1:4 001 = clock divide 1:2 000 = clock divide 1:1 note 1: see the type c timer block diagram ( figure 13-2 ). 2: see the type b timer block diagram ( figure 13-1 ). 3: see the pwmx module register interconnect diagram ( figure 16-2 ). 4: see the oscillator system diagram ( figure 9-1 ). downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 380 ? 2013-2014 microchip technology inc. register 26-7: cvr1con: co mparator voltage reference control register 1 u-0 u-0 u-0 u-0 r/w-0 r/w-0 u-0 u-0 cvrr1 vrefsel bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 cvren cvroe cvrr0 cvrss cvr3 cvr2 cvr1 cvr0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-12 unimplemented: read as 0 bit 11 cvrr1: comparator voltage reference range selection bit see bit 5. bit 10 vrefsel: voltage reference select bit 1 = cv refin = v ref + 0 = cv refin is generated by the resistor network bit 9-8 unimplemented: read as 0 bit 7 cvren: comparator voltage reference enable bit 1 = comparator voltage reference circuit is powered on 0 = comparator voltage reference circuit is powered down bit 6 cvroe: comparator voltage reference output enable on cv ref1o pin bit 1 = voltage level is output on the cv ref1o pin 0 = voltage level is disconnected from the cv ref1o pin bit 11, 5 cvrr<1:0>: comparator voltage reference range selection bits 11 = 0.00 cv rsrc to 0.94, with cv rsrc /16 step-size 10 = 0.33 cv rsrc to 0.96, with cv rsrc /24 step-size 01 = 0.00 cv rsrc to 0.67, with cv rsrc /24 step-size 00 = 0.25 cv rsrc to 0.75, with cv rsrc /32 step-size bit 4 cvrss: comparator voltage reference source selection bit 1 = comparator voltage reference source, cv rsrc = cv ref + C a vss 0 = comparator voltage reference source, cv rsrc = av dd C av ss bit 3-0 cvr<3:0> comparator voltage reference value selection 0 ? cvr<3:0> ? 15 bits when cvrr<1:0> = 11 : cv ref = (cvr<3:0>/16) ? (cv rsrc ) when cvrr<1:0> = 10 : cv ref = (1/3) ? (cv rsrc ) + (cvr<3:0>/24) ? (cv rsrc ) when cvrr<1:0> = 01 : cv ref = (cvr<3:0>/24) ? (cv rsrc ) when cvrr<1:0> = 00 : cv ref = (1/4) ? (cv rsrc ) + (cvr<3:0>/32) ? (cv rsrc ) downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 381 dspic33epxxxgm3xx/6xx/7xx register 26-8: cvr2con: co mparator voltage reference control register 2 u-0 u-0 u-0 u-0 r/w-0 r/w-0 u-0 u-0 cvrr1 vrefsel bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 cvren cvroe cvrr0 cvrss cvr3 cvr2 cvr1 cvr0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-12 unimplemented: read as 0 bit 11 cvrr1: comparator voltage reference range selection bit see bit 5. bit 10 vrefsel: voltage reference select bit 1 = reference source for inverting input is from cvr2 0 = reference source for inverting input is from cvr1 bit 9-8 unimplemented: read as 0 bit 7 cvren: comparator voltage reference enable bit 1 = comparator voltage reference circuit is powered on 0 = comparator voltage reference circuit is powered down bit 6 cvroe: comparator voltage reference output enable on cv ref2o pin bit 1 = voltage level is output on the cv ref2o pin 0 = voltage level is disconnected from the cv ref2o pin bit 11, 5 cvrr<1:0>: comparator voltage reference range selection bits 11 = 0.00 cv rsrc to 0.94, with cv rsrc /16 step-size 10 = 0.33 cv rsrc to 0.96, with cv rsrc /24 step-size 01 = 0.00 cv rsrc to 0.67, with cv rsrc /24 step-size 00 = 0.25 cv rsrc to 0.75, with cv rsrc /32 step-size bit 4 cvrss: comparator voltage reference source selection bit 1 = comparator voltage reference source, cv rsrc = cv ref + C a vss 0 = comparator voltage reference source, cv rsrc = av dd C av ss bit 3-0 cvr<3:0> comparator voltage reference value selection 0 ? cvr<3:0> ? 15 bits when cvrr<1:0> = 11 : cv ref = (cvr<3:0>/16) ? (cv rsrc ) when cvrr<1:0> = 10 : cv ref = (1/3) ? (cv rsrc ) + (cvr<3:0>/24) ? (cv rsrc ) when cvrr<1:0> = 01 : cv ref = (cvr<3:0>/24) ? (cv rsrc ) when cvrr<1:0> = 00 : cv ref = (1/4) ? (cv rsrc ) + (cvr<3:0>/32) ? (cv rsrc ) downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 382 ? 2013-2014 microchip technology inc. notes: downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 383 dspic33epxxxgm3xx/6xx/7xx 27.0 real-time clock and calendar (rtcc) this chapter discusses the real-time clock and calendar (rtcc) module and its operation. some of the key features of this module are: time: hours, minutes and seconds 24-hour format (military time) calendar: weekday, date, month and year alarm configurable year range: 2000 to 2099 leap year correction bcd format for compact firmware optimized for low-power operation user calibration with auto-adjust calibration range: 2.64 seconds error per month requirements: external 32.768 khz clock crystal alarm pulse or seconds clock output on rtcc pin the rtcc module is intended for applications where accurate time must be maintained for extended periods with minimum to no intervention from the cpu. the rtcc module is optimized for low-power usage to provide extended battery lifetime while keeping track of time. the rtcc module is a 100-year clock and calendar with automatic leap year detection. the range of the clock is from 00:00:00 (midnight) on january 1, 2000 to 23:59:59 on december 31, 2099. the hours are available in 24-hour (military time) format. the clock provides a granularity of one second with half-second visibility to the user. note 1: this data sheet summarizes the features of the dspic33epxxxgm3xx/6xx/7xx families of devices. it is not intended to be a comprehensive reference source. to complement the information in this data sheet, refer to the ?dspic33/pic24 family reference manual , real-time clock and calendar (rtcc) (ds70584), which is available from the microchip web site ( www.microchip.com ). 2: some registers and associated bits described in this section may not be available on all devices. refer to section 4.0 memory organization in this data sheet for device-specific register and bit information. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 384 ? 2013-2014 microchip technology inc. figure 27-1: rt cc block diagram sosco sosci 1hz seconds minutes hour weekday date month year seconds minutes hour weekday date month rtcc timer rtcc alarm 00 01 10 11 00 01 10 rtcptr<1:0> alrmptr<1:0> rtcoe rtcc 0 1 set rtccif flag rtsecsel rtcval alrmval cal<7:0> 32.768 khz oscillator prescaler dspic33epxxxgm pin toggle note: the rtcc is only operational on devices which include the sosc; therefore, the rtcc module is not available on 44-pin devices. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 385 dspic33epxxxgm3xx/6xx/7xx 27.1 writing to the rtcc timer the user application can configure the time and calendar by writing the desired seconds, minutes, hours, weekday, date, month and year to the rtcc registers. under normal operation, writes to the rtcc timer registers are not allowed. attempted writes will appear to execute normally, but the contents of the registers will remain unchanged. to write to the rtcc register, the rtcwren bit (rcfgcal<13>) must be set. setting the rtcwren bit allows writes to the rtcc registers. conversely, clearing the rtcwren bit prevents writes. to set the rtcwren bit, the following procedure must be executed. the rtcwren bit can be cleared at any time: 1. write 0x55 to nvmkey. 2. write 0xaa to nvmkey. 3. set the rtcwren bit using a single-cycle instruction. the rtcc module is enabled by setting the rtcen bit (rcfgcal<15>). to set or clear the rtcen bit, the rtcwren bit (rcfgcal<13>) must be set. if the entire clock (hours, minutes and seconds) needs to be corrected, it is recommended that the rtcc module should be disabled to avoid coincidental write operation when the timer increments. therefore, it stops the clock from counting while writing to the rtcc timer register. 27.2 rtcc resources many useful resources related to rtcc are provided on the main product page of the microchip web site for the devices listed in this data sheet. this product page, which can be accessed using this link , contains the latest updates and additional information. 27.2.1 key resources real-time clock and calendar (rtcc) (ds70584) in the ?dspic33/pic24 family reference manual? code samples application notes software libraries webinars all related ?dspic33/pic24 family reference manual? sections development tools note: to allow the rtcc module to be clocked by the secondary crystal oscil- lator, the secondary oscillator enable (lposcen) bit in the oscillator control (osccon<1>) register must be set. for further details, refer to the ?dspic33/ pic24 family reference manual? , oscillator (ds70580). note: in the event you are not able to access the product page using the link above, enter this url in your browser: http://www.microchip.com/wwwproducts/ devices.aspx?ddocname=en554310 downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 386 ? 2013-2014 microchip technology inc. 27.3 rtcc registers register 27-1: rcfgcal: rtcc cali bration and configuration register ( 1 ) r/w-0 u-0 r/w-0 r-0 r-0 r/w-0 r/w-0 r/w-0 rtcen ( 2 ) rtcwren rtcsync halfsec ( 3 ) rtcoe rtcptr1 rtcptr0 bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 cal7 cal6 cal5 cal4 cal3 cal2 cal1 cal0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 rtcen: rtcc enable bit ( 2 ) 1 = rtcc module is enabled 0 = rtcc module is disabled bit 14 unimplemented: read as 0 bit 13 rtcwren: rtcc value register write enable bit 1 = rtcval register can be written to by the user application 0 = rtcval register is locked out from being written to by the user application bit 12 rtcsync: rtcc value register read synchronization bit 1 = a rollover is about to occur in 32 clock edges (approximately 1 ms) 0 = a rollover will not occur bit 11 halfsec: half-second status bit ( 3 ) 1 = second half period of a second 0 = first half period of a second bit 10 rtcoe: rtcc output enable bit 1 = rtcc output is enabled 0 = rtcc output is disabled bit 9-8 rtcptr<1:0>: rtcc value register pointer bits points to the corresponding rtcc value register when reading the rtcval register; the rtcptr<1:0> value decrements on every access of the rtcval register until it reaches 00 . bit 7-0 cal<7:0>: rtcc drift calibration bits 01111111 = maximum positive adjustment; adds 508 rtcc clock pulses every one minute 00000001 = minimum positive adjustment; adds 4 rtcc clock pulses every one minute 00000000 = no adjustment 11111111 = minimum negative adjustment; subtracts 4 rtcc clock pulses every one minute 10000000 = maximum negative adjustment; subtracts 512 rtcc clock pulses every one minute note 1: the rcfgcal register is only affected by a por. 2: a write to the rtcen bit is only allowed when rtcwren = 1 . 3: this bit is read-only. it is cleared when the lower half of the minsec register is written. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 387 dspic33epxxxgm3xx/6xx/7xx register 27-2: padcfg1: pad co nfiguration control register u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 15 bit 8 u-0 u-0 u-0 u-0 u-0 u-0 r/w-0 r/w-0 rtsecsel ( 1 ) pmpttl bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-2 unimplemented: read as 0 bit 1 rtsecsel: rtcc seconds clock output select bit ( 1 ) 1 = rtcc seconds clock is selected for the rtcc pin 0 = rtcc alarm pulse is selected for the rtcc pin bit 0 not used by the rtcc module. note 1: to enable the actual rtcc output, the rtcoe bit (rcfgcal<10>) must be set. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 388 ? 2013-2014 microchip technology inc. register 27-3: alcfgrpt: al arm configuration register r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 alrmen chime amask3 amask2 amask1 amask0 alrmptr1 alrmptr0 bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 arpt7 arpt6 arpt5 arpt4 arpt3 arpt2 arpt1 arpt0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 alrmen: alarm enable bit 1 = alarm is enabled (cleared automatically after an alarm event whenever arpt<7:0> = 0x00 and chime = 0 ) 0 = alarm is disabled bit 14 chime: chime enable bit 1 = chime is enabled; arpt<7:0> bits are allowed to roll over from 0x00 to 0xff 0 = chime is disabled; arpt<7:0> bits stop once they reach 0x00 bit 13-10 amask<3:0>: alarm mask configuration bits 0000 = every half second 0001 = every second 0010 = every 10 seconds 0011 = every minute 0100 = every 10 minutes 0101 = every hour 0110 = once a day 0111 = once a week 1000 = once a month 1001 = once a year (except when configured for february 29th, once every 4 years) 101x = reserved C do not use 11xx = reserved C do not use bit 9-8 alrmptr<1:0>: alarm value register window pointer bits points to the corresponding alarm value registers when reading the alrmval register. the alrmptr<1:0> value decrements on every read or write of alrmval until it reaches 00 . bit 7-0 arpt<7:0>: alarm repeat counter value bits 11111111 = alarm will repeat 255 more times 00000000 = alarm will not repeat the counter decrements on any alarm event. the counter is prevented from rolling over from 0x00 to 0xff unless chime = 1 . downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 389 dspic33epxxxgm3xx/6xx/7xx register 27-4: rtcval (when rtcptr<1:0> = 11 ): year value register ( 1 ) u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 15 bit 8 r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x yrten3 yrten2 yrten1 yrten0 yrone3 yrone2 yrone1 yrone0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-8 unimplemented: read as 0 bit 7-4 yrten<3:0>: binary coded decimal value of years tens digit bits contains a value from 0 to 9. bit 3-0 yrone<3:0>: binary coded decimal value of years ones digit bits contains a value from 0 to 9. note 1: a write to the year register is only allowed when rtcwren = 1 . register 27-5: rtcval (when rtcptr<1:0> = 10 ): month and day value register ( 1 ) u-0 u-0 u-0 r-x r-x r-x r-x r-x mthten0 mthone3 mthone2 mthone1 mthone0 bit 15 bit 8 u-0 u-0 r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x dayten1 dayten0 dayone3 dayone2 dayone1 dayone0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-13 unimplemented: read as 0 bit 12 mthten0: binary coded decimal value of months tens digit bit contains a value of 0 or 1. bit 11-8 mthone<3:0>: binary coded decimal value of months ones digit bits contains a value from 0 to 9. bit 7-6 unimplemented: read as 0 bit 5-4 dayten<1:0>: binary coded decimal value of days tens digit bits contains a value from 0 to 3. bit 3-0 dayone<3:0>: binary coded decimal value of days ones digit bits contains a value from 0 to 9. note 1: a write to this register is only allowed when rtcwren = 1 . downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 390 ? 2013-2014 microchip technology inc. register 27-6: rtcval (when rtcptr<1:0> = 01 ): weekday and hours value register ( 1 ) u-0 u-0 u-0 u-0 u-0 r/w-x r/w-x r/w-x wday2 wday1 wday0 bit 15 bit 8 u-0 u-0 r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x hrten1 hrten0 hrone3 hrone2 hrone1 hrone0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-11 unimplemented: read as 0 bit 10-8 wday<2:0>: binary coded decimal value of weekday digit bits contains a value from 0 to 6. bit 7-6 unimplemented: read as 0 bit 5-4 hrten<1:0>: binary coded decimal value of hours tens digit bits contains a value from 0 to 2. bit 3-0 hrone<3:0>: binary coded decimal value of hours ones digit bits contains a value from 0 to 9. note 1: a write to this register is only allowed when rtcwren = 1 . register 27-7: rtcval (when rtcptr<1:0> = 00 ): minutes and seconds value register u-0 r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x minten2 minten1 minten0 minone3 minone2 minone1 minone0 bit 15 bit 8 u-0 r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x secten2 secten1 secten0 secone3 secone2 secone1 secone0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 unimplemented: read as 0 bit 14-12 minten<2:0>: binary coded decimal value of minutes tens digit bits contains a value from 0 to 5. bit 11-8 minone<3:0>: binary coded decimal value of minutes ones digit bits contains a value from 0 to 9. bit 7 unimplemented: read as 0 bit 6-4 secten<2:0>: binary coded decimal value of seconds tens digit bits contains a value from 0 to 5. bit 3-0 secone<3:0>: binary coded decimal value of seconds ones digit bits contains a value from 0 to 9. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 391 dspic33epxxxgm3xx/6xx/7xx register 27-8: alrmval (when alrmptr<1:0> = 10 ): alarm month and day value register ( 1 ) u-0 u-0 u-0 r/w-x r/w-x r/w-x r/w-x r/w-x mthten0 mthone3 mthone2 mthone1 mthone0 bit 15 bit 8 u-0 u-0 r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x dayten1 dayten0 dayone3 dayone2 dayone1 dayone0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-13 unimplemented: read as 0 bit 12 mthten0: binary coded decimal value of months tens digit bit contains a value of 0 or 1. bit 11-8 mthone<3:0>: binary coded decimal value of months ones digit bits contains a value from 0 to 9. bit 7-6 unimplemented: read as 0 bit 5-4 dayten<1:0>: binary coded decimal value of days tens digit bits contains a value from 0 to 3. bit 3-0 dayone<3:0>: binary coded decimal value of days ones digit bits contains a value from 0 to 9. note 1: a write to this register is only allowed when rtcwren = 1 . downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 392 ? 2013-2014 microchip technology inc. register 27-9: alrmval (when alrmptr<1:0> = 01 ): alarm weekday and hours value register ( 1 ) u-0 u-0 u-0 u-0 u-0 r/w-x r/w-x r/w-x wday2 wday1 wday0 bit 15 bit 8 u-0 u-0 r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x hrten1 hrten0 hrone3 hrone2 hrone1 hrone0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-11 unimplemented: read as 0 bit 10-8 wday<2:0>: binary coded decimal value of weekday digit bits contains a value from 0 to 6. bit 7-6 unimplemented: read as 0 bit 5-4 hrten<1:0>: binary coded decimal value of hours tens digit bits contains a value from 0 to 2. bit 3-0 hrone<3:0>: binary coded decimal value of hours ones digit bits contains a value from 0 to 9. note 1: a write to this register is only allowed when rtcwren = 1 . downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 393 dspic33epxxxgm3xx/6xx/7xx register 27-10: alrmval (when alrmptr<1:0> = 00 ): alarm minutes and seconds value register u-0 r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x minten2 minten1 minten0 minone3 minone2 minone1 minone0 bit 15 bit 8 u-0 r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x secten2 secten1 secten0 secone3 secone2 secone1 secone0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 unimplemented: read as 0 bit 14-12 minten<2:0>: binary coded decimal value of minutes tens digit bits contains a value from 0 to 5. bit 11-8 minone<3:0>: binary coded decimal value of minutes ones digit bits contains a value from 0 to 9. bit 7 unimplemented: read as 0 bit 6-4 secten<2:0>: binary coded decimal value of seconds tens digit bits contains a value from 0 to 5. bit 3-0 secone<3:0>: binary coded decimal value of seconds ones digit bits contains a value from 0 to 9. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 394 ? 2013-2014 microchip technology inc. notes: downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 395 dspic33epxxxgm3xx/6xx/7xx 28.0 parallel master port (pmp) the parallel master port (pmp) module is a parallel 8-bit i/o module, specifically designed to communi- cate with a wide variety of parallel devices, such as communication peripherals, lcds, external memory devices and microcontrollers. because the interface to parallel peripherals varies significantly, the pmp is highly configurable. key features of the pmp module include: eight data lines up to 16 programmable address lines up to 2 chip select lines programmable strobe options: - individual read and write strobes, or - read/write strobe with enable strobe address auto-increment/auto-decrement programmable address/data multiplexing programmable polarity on control signals legacy parallel slave port (psp) support enhanced parallel slave support: - address support - 4-byte deep auto-incrementing buffer programmable wait states figure 28-1: pmp module pinout and connections to external devices note 1: this data sheet summarizes the features of the dspic33epxxxgm3xx/6xx/7xx family of devices. it is not intended to be a comprehensive reference source. to complement the information in this data sheet, refer to the ?dspic33/pic24 family reference manual , parallel master port (pmp) (ds70576), which is available from the microchip web site ( www.microchip.com ). 2: some registers and associated bits described in this section may not be available on all devices. refer to section 4.0 memory organization in this data sheet for device-specific register and bit information. pma<0> pma<14> pma<15> pmbe pmrd pmwr pmd<7:0> pmenb pmrd/pmwr pmcs1 pma<1> pma<13:2> pmall pmalh pma<7:0> pma<15:8> pmcs2 eeprom address bus data bus control lines dspic33ep lcd fifo microcontroller 8-bit data (with or without multiplexed addressing) up to 16-bit address parallel master port buffer note: not all pmp port pins are 5v tolerant. refer to the pin diagrams section for availability. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 396 ? 2013-2014 microchip technology inc. 28.1 pmp control registers register 28-1: pmcon: parallel master port control register ( 3 ) r/w-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 pmpen psidl adrmux1 adrmux0 ptbeen ptwren ptrden bit 15 bit 8 r/w-0 r/w-0 r/w-0 ( 1 ) r/w-0 ( 1 ) r/w-0 ( 1 ) r/w-0 r/w-0 r/w-0 csf1 csf0 alp cs2p cs1p bep wrsp rdsp bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at reset 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 pmpen: parallel master port enable bit 1 = pmp module is enabled 0 = pmp module is disabled, no off-chip access is performed bit 14 unimplemented: read as 0 bit 13 psidl: pmp stop in idle mode bit 1 = discontinues module operation when device enters idle mode 0 = continues module operation in idle mode bit 12-11 adrmux<1:0>: address/data multiplexing selection bits 11 = reserved 10 = all 16 bits of address are multiplexed on pmd<7:0> pins 01 = lower eight bits of address are multiplexed on pmd<7:0> pins, upper eight bits are on pma<15:8> 00 = address and data appear on separate pins bit 10 ptbeen: byte enable port enable bit (16-bit master mode) 1 = pmbe port is enabled 0 = pmbe port is disabled bit 9 ptwren: write enable strobe port enable bit 1 = pmwr/pmenb port is enabled 0 = pmwr/pmenb port is disabled bit 8 ptrden: read/write strobe port enable bit 1 = pmrd/pmwr port is enabled 0 = pmrd/pmwr port is disabled bit 7-6 csf<1:0>: chip select function bits 11 = reserved 10 = pmcs1 and pmcs2 function as chip select 01 = pmcs2 functions as chip select, pmcs1 functions as address bit 14 00 = pmcs1 and pmcs2 function as address bits 15 and 14 bit 5 alp: address latch polarity bit ( 1 ) 1 = active-high (pmall and pmalh) 0 = active-low (pmall and pmalh ) bit 4 cs2p: chip select 1 polarity bit ( 1 ) 1 = active-high (pmcs2) 0 = active-low (pmcs2 ) note 1: these bits have no effect when their corresponding pins are used as address lines. 2: pmcs1 applies to master mode and pmcs applies to slave mode. 3: this register is not available on 44-pin devices. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 397 dspic33epxxxgm3xx/6xx/7xx bit 3 cs1p: chip select 0 polarity bit ( 1 ) 1 = active-high (pmcs1/pmcs) ( 2 ) 0 = active-low (pmcs1 /pmcs ) bit 2 bep: byte enable polarity bit 1 = byte enable is active-high (pmbe) 0 = byte enable is active-low (pmbe ) bit 1 wrsp: write strobe polarity bit for slave modes and master mode 2 (pmmode<9:8> = 00 , 01 , 10 ): 1 = write strobe is active-high (pmwr) 0 = write strobe is active-low (pmwr ) for master mode 1 (pmmode<9:8> = 11 ): 1 = enables strobe active-high (pmenb) 0 = enables strobe active-low (pmenb ) bit 0 rdsp: read strobe polarity bit for slave modes and master mode 2 (pmmode<9:8> = 00 , 01 , 10 ): 1 = read strobe is active-high (pmrd) 0 = read strobe is active-low (pmrd ) for master mode 1 (pmmode<9:8> = 11 ): 1 = enables strobe active-high (pmrd/pmwr ) 0 = enables strobe active-low (pmrd /pmwr) register 28-1: pmcon: parallel master port control register ( 3 ) (continued) note 1: these bits have no effect when their corresponding pins are used as address lines. 2: pmcs1 applies to master mode and pmcs applies to slave mode. 3: this register is not available on 44-pin devices. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 398 ? 2013-2014 microchip technology inc. register 28-2: pmmode: parallel master port mode register ( 4 ) r-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 busy irqm1 irqm0 incm1 incm0 mode16 mode1 mode0 bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 waitb1 ( 1 , 2 , 3 ) waitb0 ( 1 , 2 , 3 ) waitm3 waitm2 waitm1 waitm0 waite1 ( 1 , 2 , 3 ) waite0 ( 1 , 2 , 3 ) bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at reset 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 busy: busy bit (master mode only) 1 = port is busy 0 = port is not busy bit 14-13 irqm<1:0>: interrupt request mode bits 11 = interrupt is generated when read buffer 3 is read or write buffer 3 is written (buffered psp mode), or on a read/write operation when pma<1:0> = 11 (addressable psp mode only) 10 = reserved 01 = interrupt is generated at the end of the read/write cycle 00 = no interrupt is generated bit 12-11 incm<1:0>: increment mode bits 11 = psp read and write buffers auto-increment (legacy psp mode only) 10 = decrement addr by 1 every read/write cycle 01 = increment addr by 1 every read/write cycle 00 = no increment or decrement of address bit 10 mode16: 8/16-bit mode bit 1 = 16-bit mode: data register is 16 bits, a read/write to the data register invokes two 8-bit transfers 0 = 8-bit mode: data register is 8 bits, a read/write to the data register invokes one 8-bit transfer bit 9-8 mode<1:0>: parallel slave port mode select bits 11 = master mode 1 (pmcsx, pmrd/pmwr , pmenb, pmbe, pma and pmd<7:0>) 10 = master mode 2 (pmcsx, pmrd, pmwr, pmbe, pma and pmd<7:0>) 01 = enhanced psp, control signals (pmrd, pmwr, pmcsx, pmd<7:0> and pma<1:0>) 00 = legacy parallel slave port, control signals (pmrd, pmwr, pmcsx and pmd<7:0>) bit 7-6 waitb<1:0>: data setup to read/write/address phase wait state configuration bits ( 1 , 2 , 3 ) 11 = data wait of 4 t p (demultiplexed/multiplexed); address phase of 4 t p (multiplexed) 10 = data wait of 3 t p (demultiplexed/multiplexed); address phase of 3 t p (multiplexed) 01 = data wait of 2 t p (demultiplexed/multiplexed); address phase of 2 t p (multiplexed) 00 = data wait of 1 t p (demultiplexed/multiplexed); address phase of 1 t p (multiplexed) note 1: the applied wait state depends on whether data and address are multiplexed or demultiplexed. see section 4.1.8 wait states in the parallel master port (pmp) (ds70576) in the ?dspic33/pic24 family reference manual? for more information. 2: waitb<1:0> and waite<1:0> bits are ignored whenever waitm<3:0> = 0000 . 3: t p = 1/f p . 4: this register is not available on 44-pin devices. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 399 dspic33epxxxgm3xx/6xx/7xx bit 5-2 waitm<3:0>: read to byte enable strobe wait state configuration bits 1111 = wait of additional 15 t p 0001 = wait of additional 1 t p 0000 = no additional wait cycles (operation forced into one t p ) bit 1-0 waite<1:0>: data hold after strobe wait state configuration bits ( 1 , 2 , 3 ) 11 = wait of 4 t p 10 = wait of 3 t p 01 = wait of 2 t p 00 = wait of 1 t p register 28-2: pmmode: parallel master port mode register ( 4 ) (continued) note 1: the applied wait state depends on whether data and address are multiplexed or demultiplexed. see section 4.1.8 wait states in the parallel master port (pmp) (ds70576) in the ?dspic33/pic24 family reference manual? for more information. 2: waitb<1:0> and waite<1:0> bits are ignored whenever waitm<3:0> = 0000 . 3: t p = 1/f p . 4: this register is not available on 44-pin devices. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 400 ? 2013-2014 microchip technology inc. register 28-3: pmaddr: parallel master port address register (master modes only) ( 1 , 2 ) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 cs2 cs1 addr13 addr12 addr11 addr10 addr9 addr8 bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 addr7 addr6 addr5 addr4 addr3 addr2 addr1 addr0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at reset 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 cs2: chip select 2 bit if pmcon<7:6> = 10 or 01 : 1 = chip select 2 is active 0 = chip select 2 is inactive if pmcon<7:6> = 11 or 00 : bit functions as addr15. bit 14 cs1: chip select 1 bit if pmcon<7:6> = 10 : 1 = chip select 1 is active 0 = chip select 1 is inactive if pmcon<7:6> = 11 or 0x : bit functions as addr14. bit 13-0 addr<13:0>: destination address bits note 1: in enhanced slave mode, pmaddr functions as pmdout1, one of the two data buffer regi sters. 2: this register is not available on 44-pin devices. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 401 dspic33epxxxgm3xx/6xx/7xx register 28-4: pmaen: parallel mast er port address enable register ( 1 ) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 pten15 pten14 pten<13:8> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 pten<7:2> pten<1:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at reset 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 pten15: pmcs2 strobe enable bit 1 = pma15 functions as either pma<15> or pmcs2 0 = pma15 functions as port i/o bit 14 pten14: pmcs1 strobe enable bit 1 = pma14 functions as either pma<14> or pmcs1 0 = pma14 functions as port i/o bit 13-2 pten<13:2>: pmp address port enable bits 1 = pma<13:2> function as pmp address lines 0 = pma<13:2> function as port i/os bit 1-0 pten<1:0>: pmalh/pmall strobe enable bits 1 = pma1 and pma0 function as either pma<1:0> or pmalh and pmall 0 = pma1 and pma0 function as port i/os note 1: this register is not available on 44-pin devices. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 402 ? 2013-2014 microchip technology inc. register 28-5: pmstat: parallel master port status register (slave mode only ) ( 1 ) r-0 r/w-0, hs u-0 u-0 r-0 r-0 r-0 r-0 ibf ibov ib3f ib2f ib1f ib0f bit 15 bit 8 r-1 r/w-0, hs u-0 u-0 r-1 r-1 r-1 r-1 obe obuf ob3e ob2e ob1e ob0e bit 7 bit 0 legend: hs = hardware settable bit r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at reset 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 ibf: input buffer full status bit 1 = all writable input buffer registers are full 0 = some or all of the writable input buffer registers are empty bit 14 ibov: input buffer overflow status bit 1 = a write attempt to a full input byte register occurred (must be cleared in software) 0 = no overflow occurred bit 13-12 unimplemented: read as 0 bit 11-8 ib3f:ib0f: input buffer x status full bit 1 = input buffer x contains data that has not been read (reading buffer will clear this bit) 0 = input buffer x does not contain any unread data bit 7 obe: output buffer empty status bit 1 = all readable output buffer registers are empty 0 = some or all of the readable output buffer registers are full bit 6 obuf: output buffer underflow status bit 1 = a read occurred from an empty output byte register (must be cleared in softwa re) 0 = no underflow occurred bit 5-4 unimplemented: read as 0 bit 3-0 ob3e:ob0e: output buffer x status empty bit 1 = output buffer x is empty (writing data to the buffer will clear this bit) 0 = output buffer x contains data that has not been transmitted note 1: this register is not available on 44-pin devices. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 403 dspic33epxxxgm3xx/6xx/7xx register 28-6: padcfg1: pad co nfiguration control register u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 15 bit 8 u-0 u-0 u-0 u-0 u-0 u-0 r/w-0 r/w-0 rtsecsel pmpttl bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-2 unimplemented: read as 0 bit 1 not used by the pmp module. bit 0 pmpttl: pmp module ttl input buffer select bit 1 = pmp module uses ttl input buffers 0 = pmp module uses schmitt trigger input buffers downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 404 ? 2013-2014 microchip technology inc. notes: downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 405 dspic33epxxxgm3xx/6xx/7xx 29.0 programmable cyclic redundancy check (crc) generator the programmable crc generator offers the following features: user-programmable (up to 32nd order) polynomial crc equation interrupt output data fifo the programmable crc generator provides a hardware-implemented method of quickly generating checksums for various networking and security applications. it offers the following features: user-programmable crc polynomial equation, up to 32 bits programmable shift direction (little or big-endian) independent data and polynomial lengths configurable interrupt output data fifo a simplified block diagram of the crc generator is shown in figure 29-1 . a simple version of the crc shift engine is shown in figure 29-2 . figure 29-1: crc block diagram note 1: this data sheet summarizes the features of the dspic33epxxxgm3xx/6xx/7xx family of devices. it is not intended to be a comprehensive reference source. to com- plement the information in this data sheet, refer to the dspic33/pic24 family refer- ence manual , 32-bit programmable cyclic redundancy check (crc) (ds70346), which is available from the microchip web site ( www.microchip.com ). 2: some registers and associated bits described in this section may not be available on all devices. refer to section 4.0 memory organization in this data sheet for device-specific register and bit information. crcdath crcdatl crcwdath crcwdatl lendian 1 0 crcisel 1 0 fifo empty event shift complete event set crcif 2 * f p shift clock variable fifo (4x32, 8x16 or 16x8) shift buffer crc shift engine downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 406 ? 2013-2014 microchip technology inc. figure 29-2: crc shift engine detail 29.1 overview the crc module can be programmed for crc polynomials of up to the 32nd order, using up to 32 bits. polynomial length, which reflects the highest exponent in the equation, is selected by the plen<4:0> bits (crccon2<4:0>). the crcxorl and crcxorh registers control which exponent terms are included in the equation. setting a particular bit includes that exponent term in the equation; functionally, this includes an xor operation on the corresponding bit in the crc engine. clearing the bit disables the xor. for example, consider two crc polynomials, one a 16-bit equation and the other a 32-bit equation: to program these polynomials into the crc generator, set the register bits as shown in table 29-1 . note that the appropriate positions are set to 1 to indicate that they are used in the equation (for example, x26 and x23). the 0 bit required by the equation is always xored; thus, x0 is a dont care. for a poly- nomial of length n , it is assumed that the n th bit will always be used, regardless of the bit setting. therefore, for a polynomial length of 32, there is no 32nd bit in the crcxor register. table 29-1: crc setup examples for 16 and 32-bit polynomial crcwdath crcwdatl bit 1 bit n (2) x(1) (1) read/write bus shift buffer data bit 2 x(2) (1) x(n) (1) note 1: each xor stage of the shift engine is programmable. see text for details. 2: polynomial length n is determined by ([plen<4:0>] + 1). bit 0 x16 + x12 + x5 + 1 and x32 + x26 + x23 + x22 + x16 + x12 + x11 + x10 + x8 + x7 + x5 + x4 + x2 + x + 1 crc control bits bit values 16-bit polynomial 32-bit polynomial plen<4:0> 01111 11111 x<31:16> 0000 0000 0000 000x 0000 0100 1100 0001 x<15:0> 0001 0000 0010 000x 0001 1101 1011 011x downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 407 dspic33epxxxgm3xx/6xx/7xx 29.2 programmable crc control registers register 29-1: crccon1: c rc control register 1 r/w-0 u-0 r/w-0 r-0 r-0 r-0 r-0 r-0 crcen csidl vword4 vword3 vword2 vword1 vword0 bit 15 bit 8 r-0 r-1 r/w-0 r/w-0 r/w-0 u-0 u-0 u-0 crcful crcmpt crcisel crcgo lendian bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 crcen: crc enable bit 1 = crc module is enabled 0 = crc module is disabled; all state machines, pointers and crcwdat/crcdat ar e reset, other sfrs are not reset bit 14 unimplemented: read as 0 bit 13 csidl: crc stop in idle mode bit 1 = discontinues module operation when device enters idle mode 0 = continues module operation in idle mode bit 12-8 vword<4:0>: valid word pointer value bits indicates the number of valid words in the fifo; has a maximum value of 8 when plen<4:0> > 7 or 16 when plen<4:0> ?? 7 bit 7 crcful : crc fifo full bit 1 = fifo is full 0 = fifo is not full bit 6 crcmpt: crc fifo empty bit 1 = fifo is empty 0 = fifo is not empty bit 5 crcisel: crc interrupt selection bit 1 = interrupt on fifo empty; final word of data is still shifting throug h crc 0 = interrupt on shift complete and crcwdat results are ready bit 4 crcgo: crc start bit 1 = start crc serial shifter 0 = crc serial shifter is turned off bit 3 lendian: data word little-endian configuration bit 1 = data word is shifted into the crc starting with the lsb (little endian) 0 = data word is shifted into the crc starting with the msb (big endian) bit 2-0 unimplemented: read as 0 downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 408 ? 2013-2014 microchip technology inc. register 29-2: crccon2: crc control register 2 u-0 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 dwidth4 dwidth3 dwidth2 dwidth1 dwidth0 bit 15 bit 8 u-0 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 plen4 plen3 plen2 plen1 plen0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-13 unimplemented: read as 0 bit 12-8 dwidth<4:0>: data width select bits these bits set the width of the data word (dwidth<4:0> + 1). bit 7-5 unimplemented: read as 0 bit 4-0 plen<4:0>: polynomial length select bits these bits set the length of the polynomial (polynomial length = plen<4:0> + 1). downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 409 dspic33epxxxgm3xx/6xx/7xx register 29-3: crcxorh: crc xor po lynomial high register r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 x<31:24> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 x<23:16> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 x<31:16>: xor of polynomial term x n enable bits register 29-4: crcxorl: crc xor polynomial low register r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 x<15:8> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 u-0 x<7:1> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-1 x<15:1>: xor of polynomial term x n enable bits bit 0 unimplemented: read as 0 downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 410 ? 2013-2014 microchip technology inc. notes: downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 411 dspic33epxxxgm3xx/6xx/7xx 30.0 special features dspic33epxxxgm3xx/6xx/7xx devices include several features intended to maximize application flexibility and reliability, and minimize cost through elimination of external components. these are: flexible configuration watchdog timer (wdt) code protection and codeguard? security jtag boundary scan interface in-circuit serial programming? (icsp?) in-circuit emulation 30.1 configuration bits in dspic33epxxxgm3xx/6xx/7xx devices, the configuration bytes are implemented as volatile memory. this means that configuration data must be programmed each time the device is powered up. configuration data is stored at the top of the on-chip program memory space, known as the flash configu- ration bytes. their specific locations are shown in table 30-1 . the configuration data is automatically loaded from the flash configuration bytes to the proper configuration shadow registers during device resets. when creating applications for these devices, users should always specifically allocate the location of the flash configuration bytes for configuration data in their code for the compiler. this is to make certain that pro- gram code is not stored in this address when the code is compiled. the upper 2 bytes of all flash configuration words in program memory should always be 1111 1111 1111 1111 . this makes them appear to be nop instructions in the remote event that their locations are ever executed by accident. since config- uration bits are not implemented in the corresponding locations, writing 1 s to these locations has no effect on device operation. the configuration flash bytes map is shown in table 30-1 . note: this data sheet summarizes the features of the dspic33epxxxgm3xx/6xx/7xx family of devices. it is not intended to be a comprehensive reference source. to complement the information in this data sheet, refer to the related section of the dspic33/pic24 family reference manual , which is available from the microchip web site ( www.microchip.com ). note: configuration data is reloaded on all types of device resets. note: performing a page erase operation on the last page of program memory clears the flash configuration bytes, enabling code protection as a result. therefore, users should avoid performing page erase operations on the last page of program memory. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 412 ? 2013-2014 microchip technology inc. table 30-1: configuration byte register map file name address device memory size (kbytes) bits 23-8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 reserved 0157ec 128 02afec 256 0557ec 512 reserved 0157ee 128 02afee 256 0557ee 512 ficd 0157f0 128 r e s e r v e d ( 2 ) jtagen reserved ( 1 ) reserved ( 2 ) i c s < 1 : 0 > 02aff0 256 0557f0 512 fpor 0157f2 128 wdtwin<1:0> alti2c2 alti2c1 boren 02aff2 256 0557f2 512 fwdt 0157f4 128 fwdten windis pllken wdtpre wdtpost<3:0> 02aff4 256 0557f4 512 fosc 0157f6 128 fcksm<1:0> iol1way osciofnc poscmd<1:0> 02aff6 256 0557f6 512 foscsel 0157f8 128 ieso pwmlock f n o s c < 2 : 0 > 02aff8 256 0557f8 512 fgs 0157fa 128 gcp gwrp 02affa 256 0557fa 512 reserved 0157fc 128 02affc 256 0557fc 512 reserved 0157fe 128 02affe 256 0557fe 512 legend: = unimplemented, read as 1 . note 1: this bit is reserved and must be programmed as 0 . 2: this bit is reserved and must be programmed as 1 . downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 413 dspic33epxxxgm3xx/6xx/7xx table 30-2: configuration bits description bit field description gcp general segment code-protect bit 1 = user program memory is not code-protected 0 = code protection is enabled for the entire program memory space gwrp general segment write-protect bit 1 = user program memory is not write-protected 0 = user program memory is write-protected ieso two-speed oscillator start-up enable bit ( 1 ) 1 = starts up device with frc, then automatically switches to the user-selected oscillator source when ready 0 = starts up device with user-selected oscillator source pwmlock pwm lock enable bit 1 = certain pwm registers may only be written after a key sequence 0 = pwm registers may be written without a key sequence fnosc<2:0> oscillator selection bits 111 = fast rc oscillator with divide-by-n (frcdivn) 110 = reserved 101 = low-power rc oscillator (lprc) 100 = secondary oscillator (sosc) 011 = primary oscillator with pll module (xt + pll, hs + pll, ec + pll) 010 = primary oscillator (xt, hs, ec) 001 = fast rc oscillator with divide-by-n with pll module (frcpll) 000 = fast rc oscillator (frc) fcksm<1:0> clock switching mode bits 1x = clock switching is disabled, fail-safe clock monitor is disabled 01 = clock switching is enabled, fail-safe clock monitor is disabled 00 = clock switching is enabled, fail-safe clock monitor is enabled iol1way peripheral pin select configuration bit 1 = allows only one reconfiguration 0 = allows multiple reconfigurations osciofnc osc2 pin function bit (except in xt and hs modes) 1 = osc2 is the clock output 0 = osc2 is the general purpose digital i/o pin poscmd<1:0> primary oscillator mode select bits 11 = primary oscillator mode is disabled 10 = hs crystal oscillator mode 01 = xt crystal oscillator mode 00 = ec (external clock) mode fwdten watchdog timer enable bit 1 = watchdog timer is always enabled (lprc oscillator cannot be disabled. clea ring the swdten bit in the rcon register will have no effect.) 0 = watchdog timer is enabled/disabled by user software (lprc can be disabled by clearing the swdten bit in the rcon register.) windis watchdog timer window enable bit 1 = watchdog timer in non-window mode 0 = watchdog timer in window mode pllken pll lock enable bit 1 = pll lock is enabled 0 = pll lock is disabled note 1: the two-speed start-up is not enabled when ec mode is used since the ec cloc ks will be ready immediately. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 414 ? 2013-2014 microchip technology inc. wdtpre watchdog timer prescaler bit 1 = 1:128 0 = 1:32 wdtpost<3:0> watchdog timer postscaler bits 1111 = 1:32,768 1110 = 1:16,384 0001 = 1:2 0000 = 1:1 wdtwin<1:0> watchdog timer window select bits 11 = wdt window is 25% of wdt period 10 = wdt window is 37.5% of wdt period 01 = wdt window is 50% of wdt period 00 = wdt window is 75% of wdt period alti2c1 alternate i2c1 pins bit 1 = i2c1 is mapped to the sda1/scl1 pins 0 = i2c1 is mapped to the asda1/ascl1 pins alti2c2 alternate i2c2 pins bit 1 = i2c2 is mapped to the sda2/scl2 pins 0 = i2c2 is mapped to the asda2/ascl2 pins boren brown-out reset (bor) detection enable bit 1 = bor is enabled 0 = bor is disabled jtagen jtag enable bit 1 = jtag is enabled 0 = jtag is disabled ics<1:0> icd communication channel select bits 11 = communicates on pgec1 and pged1 10 = communicates on pgec2 and pged2 01 = communicates on pgec3 and pged3 00 = reserved, do not use table 30-2: configuration bits description (continued) bit field description note 1: the two-speed start-up is not enabled when ec mode is used since the ec cloc ks will be ready immediately. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 415 dspic33epxxxgm3xx/6xx/7xx register 30-1: devid: device id register rrrrrrrr devid<23:16> ( 1 ) bit 23 bit 16 rrrrrrrr devid<15:8> ( 1 ) bit 15 bit 8 rrrrrrrr devid<7:0> ( 1 ) bit 7 bit 0 legend: r = read-only bit u = unimplemented bit bit 23-0 devid<23:0>: device identifier bits ( 1 ) note 1: refer to the ?dspic33e/pic24e flash programming specification for devices with volatile configuration bits? (ds70663) for the list of device id values. register 30-2: devrev: device revision register rrrrrrrr devrev<23:16> ( 1 ) bit 23 bit 16 rrrrrrrr devrev<15:8> ( 1 ) bit 15 bit 8 rrrrrrrr devrev<7:0> ( 1 ) bit 7 bit 0 legend: r = read-only bit u = unimplemented bit bit 23-0 devrev<23:0>: device revision bits ( 1 ) note 1: refer to the ?dspic33e/pic24e flash programming specification for devices with volatile configuration bits? (ds70663) for the list of device revision values. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 416 ? 2013-2014 microchip technology inc. 30.2 user id words dspic33epxxxgm3xx/6xx/7xx devices contain four user id words, located at addresses, 0x800ff8 through 0x800ffe. the user id words can be used for storing product information, such as serial numbers, system manufacturing dates, manufacturing lot numbers and other application-specific information. the user id words register map is shown in table 30-3 . table 30-3: user id words register map 30.3 on-chip voltage regulator all of the dspic33epxxxgm3xx/6xx/7xx devices power their core digital logic at a nominal 1.8v. this can create a conflict for designs that are required to operate at a higher typical voltage, such as 3.3v. to simplify system design, all devices in the dspic33epxxxgm3xx/6xx/ 7xx family incorporate an on-chip regulator that allows the device to run its core logic from v dd . the regulator provides power to the core from the other v dd pins. a low-esr (less than 1 ohm) capacitor (such as tantalum or ceramic) must be connected to the v cap pin ( figure 30-1 ). this helps to maintain the stability of the regulator. the recommended value for the filter capacitor is provided in tab le 3 3- 5 , located in section 33.0 electrical characteristics . figure 30-1: conne ctions for the on-chip voltage regulator ( 1 , 2 , 3 ) 30.4 brown-out reset (bor) the brown-out reset (bor) module is based on an internal voltage reference circuit that monitors the reg- ulated supply voltage, v cap . the main purpose of the bor module is to generate a device reset when a brown-out condition occurs. brown-out conditions are generally caused by glitches on the ac mains (for example, missing portions of the ac cycle waveform due to bad power transmission lines or voltage sags due to excessive current draw when a large inductive load is turned on). a bor generates a reset pulse, which resets the device. the bor selects the clock source, based on the device configuration bit values (fnosc<2:0> and poscmd<1:0>). if an oscillator mode is selected, the bor activates the oscillator start-up timer (ost). the system clock is held until ost expires. if the pll is used, the clock is held until the lock bit (osccon<5>) is 1 . concurrently, the power-up timer (pwrt) time-out (t pwrt ) is applied before the internal reset is released. if t pwrt = 0 and a crystal oscillator is being used, then a nominal delay of t fscm is applied. the total delay in this case is t fscm . refer to parameter sy35 in table 33-21 of section 33.0 electrical characteristics for specific t fscm values. the bor status bit (rcon<1>) is set to indicate that a bor has occurred. the bor circuit continues to oper- ate while in sleep or idle mode and resets the device should v dd fall below the bor threshold voltage. file name address bits<23:16> bits<15:0> fuid0 0x800ff8 u i d 0 fuid1 0x800ffa u i d 1 fuid2 0x800ffc u i d 2 fuid3 0x800ffe u i d 3 legend: = unimplemented, read as 1 . note: it is important for the low-esr capacitor to be placed as close as possible to the v cap pin. note 1: these are typical operating voltages. refer to table 33-5 located in section 33.1 dc characteristics for the full operating ranges of v dd and v cap . 2: it is important for the low-esr capacitor to be placed as close as possible to the v cap pin. 3: typical v cap pin voltage = 1.8v when v dd v ddmin . v dd v cap v ss dspic33ep 3.3v c efc downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 417 dspic33epxxxgm3xx/6xx/7xx 30.5 watchdog timer (wdt) for dspic33epxxxgm3xx/6xx/7xx devices, the wdt is driven by the lprc oscillator. when the wdt is enabled, the clock source is also enabled. 30.5.1 prescaler/postscaler the nominal wdt clock source from lprc is 32 khz. this feeds a prescaler that can be configured for either 5-bit (divide-by-32) or 7-bit (divide-by-128) operation. the prescaler is set by the wdtpre configuration bit. with a 32 khz input, the prescaler yields a wdt time-out period (t wdt ), as shown in parameter sy12 in table 33-21 . a variable postscaler divides down the wdt prescaler output and allows for a wide range of time-out periods. the postscaler is controlled by the wdtpost<3:0> configuration bits (fwdt<3:0>), which allow the selection of 16 settings, from 1:1 to 1:32,768. using the prescaler and postscaler, time-out periods ranging from 1 ms to 131 seconds can be achieved. the wdt, prescaler and postscaler are reset: on any device reset on the completion of a clock switch, whether invoked by software (i.e., setting the oswen bit after changing the noscx bits) or by hardware (i.e., fail-safe clock monitor) when a pwrsav instruction is executed (i.e., sleep or idle mode is entered) when the device exits sleep or idle mode to resume normal operation by a clrwdt instruction during normal execution 30.5.2 sleep and idle modes if the wdt is enabled, it continues to run during sleep or idle modes. when the wdt time-out occurs, the device wakes the device and code execution continues from where the pwrsav instruction was executed. the corre- sponding sleep or idle bit (rcon<3,2>) needs to be cleared in software after the device wakes up. 30.5.3 enabling wdt the wdt is enabled or disabled by the fwdten configuration bit in the fwdt configuration register. when the fwdten configuration bit is set, the wdt is always enabled. the wdt can be optionally controlled in software when the fwdten configuration bit has been programmed to 0 . the wdt is enabled in software by setting the swdten control bit (rcon<5>). the swdten control bit is cleared on any device reset. the software wdt option allows the user application to enable the wdt for critical code segments and disable the wdt during non-critical segments for maximum power savings. the wdt flag bit, wdto (rcon<4>), is not automati- cally cleared following a wdt time-out. to detect subsequent wdt events, the flag must be cleared in software. 30.5.4 wdt window the watchdog timer has an optional windowed mode enabled by programming the windis bit in the wdt configuration register (fwdt<6>). in the windowed mode (windis = 0 ), the wdt should be cleared based on the settings in the programmable watchdog timer window select bits (wdtwin<1:0>). figure 30-2: wdt block diagram note: the clrwdt and pwrsav instructions clear the prescaler and postscaler counts when executed. 0 1 wdtpre wdtpost<3:0> watchdog timer prescaler (divide-by-n1) postscaler (divide-by-n2) sleep/idle wdt wdt window select windis wdt clrwdt instruction swdten fwdten lprc clock rs rs wake-up reset wdtwin<1:0> all device resets transition to new clock source exit sleep or idle mode pwrsav instruction clrwdt instruction downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 418 ? 2013-2014 microchip technology inc. 30.6 jtag interface dspic33epxxxgm3xx/6xx/7xx devices implement a jtag interface, which supports boundary scan device testing. detailed information on this interface is provided in future revisions of the document. 30.7 in-circuit serial programming the dspic33epxxxgm3xx/6xx/7xx devices can be serially programmed while in the end application circuit. this is done with two lines for clock and data, and three other lines for power, ground and the programming sequence. serial programming allows customers to manufacture boards with unprogrammed devices and then program the device just before shipping the product. serial programming also allows the most recent firmware or a custom firmware to be programmed. refer to the ?dspic33e/pic24e flash programming specification for devices with volatile configuration bits? (ds70663) for details about in-circuit serial programming (icsp). any of the three pairs of programming clock/data pins can be used: pgec1 and pged1 pgec2 and pged2 pgec3 and pged3 30.8 in-circuit debugger when mplab ? icd 3 or the real ice? in-circuit emu- lator is selected as a debugger, the in-circuit debugging functionality is enabled. this function allows simple debugging functions when used with mplab x ide. debugging functionality is controlled through the pgecx (emulation/debug clock) and pgedx (emulation/debug data) pin functions. any of the three pairs of debugging clock/data pins can be used: pgec1 and pged1 pgec2 and pged2 pgec3 and pged3 to use the in-circuit debugger function of the device, the design must implement icsp connections to mclr , v dd , v ss and the pgecx/pgedx pin pair. in addition, when the feature is enabled, some of the resources are not available for general use. these resources include the first 80 bytes of data ram and two i/o pins (pgecx and pgedx). 30.9 code protection and codeguard? security the dspic33epxxxgm3xx/6xx/7xx devices offer basic implementation of codeguard security that supports only general segment (gs) security. this feature helps protect individual intellectual property. note: refer to the ?dspic33/pic24 family reference manual? , programming and diagnostics (ds70608) for further information on usage, configuration and operation of the jtag interface. note: refer to the ?dspic33/pic24 family reference manual? , codeguard? security (ds70634) for further information on usage, configuration and operation of codeguard security. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 419 dspic33epxxxgm3xx/6xx/7xx 31.0 instruction set summary the dspic33ep instruction set is almost identical to that of the dspic30f and dspic33f. most instructions are a single program memory word (24 bits). only three instructions require two program memory locations. each single-word instruction is a 24-bit word, divided into an 8-bit opcode, which specifies the instruction type and one or more operands, which further specify the operation of the instruction. the instruction set is highly orthogonal and is grouped into five basic categories: word or byte-oriented operations bit-oriented operations literal operations dsp operations control operations table 31-1 lists the general symbols used in describing the instructions. the dspic33e instruction set summary in tab l e 3 1- 2 lists all the instructions, along with the status flags affected by each instruction. most word or byte-oriented w register instructions (including barrel shift instructions) have three operands: the first source operand, which is typically a register wb without any address modifier the second source operand, which is typically a register ws with or without an address modifier the destination of the result, which is typically a register wd with or without an address modifier however, word or byte-oriented file register instructions have two operands: the file register specified by the value f the destination, which could be either the file register f or the w0 register, which is denoted as wreg most bit-oriented instructions (including simple rotate/ shift instructions) have two operands: the w register (with or without an address modifier) or file register (specified by the value of ws or f) the bit in the w register or file register (specified by a literal value or indirectly by the contents of register wb) the literal instructions that involve data movement can use some of the following operands: a literal value to be loaded into a w register or file register (specified by k) the w register or file register where the literal value is to be loaded (specified by wb or f) however, literal instructions that involve arithmetic or logical operations use some of the following operands: the first source operand, which is a register wb without any address modifier the second source operand, which is a literal value the destination of the result (only if not the same as the first source operand), which is typically a register wd with or without an address modifier the mac class of dsp instructions can use some of the following operands: the accumulator (a or b) to be used (required operand) the w registers to be used as the two operands the x and y address space prefetch operations the x and y address space prefetch destinations the accumulator write back destination the other dsp instructions do not involve any multiplication and can include: the accumulator to be used (required) the source or destination operand (designated as wso or wdo, respectively) with or without an address modifier the amount of shift specified by a w register wn or a literal value the control instructions can use some of the following operands: a program memory address the mode of the table read and table write instructions note: this data sheet summarizes the features of the dspic33epxxxgm3xx/6xx/7xx family of devices. it is not intended to be a comprehensive reference source. to complement the information in this data sheet, refer to the related section of the dspic33/pic24 family reference manual , which is available from the microchip web site ( www.microchip.com ). downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 420 ? 2013-2014 microchip technology inc. most instructions are a single word. certain double-word instructions are designed to provide all the required information in these 48 bits. in the second word, the 8msbs are 0 s. if this second word is executed as an instruction (by itself), it executes as a nop . the double-word instructions execute in two instruction cycles. most single-word instructions are executed in a single instruction cycle, unless a conditional test is true, or the program counter is changed as a result of the instruction, or a psv or table read is performed. in these cases, the execution takes multiple instruction cycles with the additional instruction cycle(s) executed as a nop . certain instructions that involve skipping over the subsequent instruction require either two or three cycles if the skip is performed, depending on whether the instruction being skipped is a single-word or two- word instruction. moreover, double-word moves require two cycles. note: for more details on the instruction set, refer to the ?16-bit mcu and dsc programmer?s reference manual? (ds70157). table 31-1: symbols used in opcode descriptions field description #text means literal defined by text (text) means content of text [text] means the location addressed by text { } optional field or operation a ? {b, c, d} a is selected from the set of values b, c, d register bit field .b byte mode selection .d double-word mode selection .s shadow register select .w word mode selection (default) acc one of two accumulators {a, b} awb accumulator write back destination address register ?? {w13, [w13]+ = 2} bit4 4-bit bit selection field (used in word addressed instructions) ?? {0...15} c, dc, n, ov, z mcu status bits: carry, digit carry, negative, overflow, sticky zero expr absolute address, label or expression (resolved by the linker) f file register address ?? {0x0000...0x1fff} lit1 1-bit unsigned literal ?? {0,1} lit4 4-bit unsigned literal ?? {0...15} lit5 5-bit unsigned literal ?? {0...31} lit8 8-bit unsigned literal ?? {0...255} lit10 10-bit unsigned literal ?? {0...255} for byte mode, {0:1023} for word mode lit14 14-bit unsigned literal ?? {0...16384} lit16 16-bit unsigned literal ?? {0...65535} lit23 23-bit unsigned literal ?? {0...8388608}; lsb must be 0 none field does not require an entry, can be blank oa, ob, sa, sb dsp status bits: acca overflow, accb overflow, acca saturat e, accb saturate pc program counter slit10 10-bit signed literal ?? {-512...511} slit16 16-bit signed literal ?? {-32768...32767} slit6 6-bit signed literal ?? {-16...16} wb base w register ?? {w0...w15} wd destination w register ?? { wd, [wd], [wd++], [wd--], [++wd], [--wd] } wdo destination w register ?? { wnd, [wnd], [wnd++], [wnd--], [++wnd], [--wnd], [wnd+wb] } wm,wn dividend, divisor working r egister pair (direct addressing) downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 421 dspic33epxxxgm3xx/6xx/7xx wm*wm multiplicand and multiplier working register pair for square instructions ?? {w4 * w4,w5 * w5,w6 * w6,w7 * w7} wm*wn multiplicand and multiplier working register pair for dsp instructions ? {w4 * w5,w4 * w6,w4 * w7,w5 * w6,w5 * w7,w6 * w7} wn one of 16 working registers ?? {w0...w15} wnd one of 16 destination working registers ?? {w0...w15} wns one of 16 source working registers ?? {w0...w15} wreg w0 (working register used in file register instructions) ws source w register ?? { ws, [ws], [ws++], [ws--], [++ws], [--ws] } wso source w register ?? { wns, [wns], [wns++], [wns--], [++wns], [--wns], [wns+wb] } wx x data space prefetch address register for dsp instructions ? {[w8] + = 6, [w8] + = 4, [w8] + = 2, [w8], [w8] - = 6, [w8] - = 4, [w8] - = 2, [w9] + = 6, [w9] + = 4, [w9] + = 2, [w9], [w9] - = 6, [w9] - = 4, [w9] - = 2, [w9 + w12], none} wxd x data space prefetch destination register for dsp instructions ?? {w4...w7} wy y data space prefetch address register for dsp instructions ? {[w10] + = 6, [w10] + = 4, [w10] + = 2, [w10], [w10] - = 6, [w10] - = 4, [w10] - = 2, [w11] + = 6, [w11] + = 4, [w11] + = 2, [w11], [w11] - = 6, [w11] - = 4, [w1 1] - = 2, [w11 + w12], none} wyd y data space prefetch destination register for dsp instructions ?? {w4...w7} table 31-1: symbols used in opcode descriptions (continued) field description downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 422 ? 2013-2014 microchip technology inc. table 31-2: instruction set overview base instr # assembly mnemonic assembly syntax description # of words # of cycles status flags affected 1 add add acc add accumulators 1 1 oa,ob,sa, sb add f f = f + wreg 1 1 c,dc,n,ov,z add f,wreg wreg = f + wreg 1 1 c,dc,n,ov,z add #lit10,wn wd = lit10 + wd 1 1 c,dc,n,ov,z add wb,ws,wd wd = wb + ws 1 1 c,dc,n,ov,z add wb,#lit5,wd wd = wb + lit5 1 1 c,dc,n,ov,z add wso,#slit4,acc 16-bit signed add to accumulator 1 1 oa,ob,sa, sb 2 addc addc f f = f + wreg + (c) 1 1 c,dc,n,ov,z addc f,wreg wreg = f + wreg + (c) 1 1 c,dc,n,ov,z addc #lit10,wn wd = lit10 + wd + (c) 1 1 c,dc,n,ov,z addc wb,ws,wd wd = wb + ws + (c) 1 1 c,dc,n,ov,z addc wb,#lit5,wd wd = wb + lit5 + (c) 1 1 c,dc,n,ov,z 3 and and f f = f .and. wreg 1 1 n,z and f,wreg wreg = f .and. wreg 1 1 n,z and #lit10,wn wd = lit10 .and. wd 1 1 n,z and wb,ws,wd wd = wb .and. ws 1 1 n,z and wb,#lit5,wd wd = wb .and. lit5 1 1 n,z 4 asr asr f f = arithmetic right shift f 1 1 c,n,ov,z asr f,wreg wreg = arithmetic right shift f 1 1 c,n,ov,z asr ws,wd wd = arithmetic right shift ws 1 1 c,n,ov,z asr wb,wns,wnd wnd = arithmetic right shift wb by wns 1 1 n,z asr wb,#lit5,wnd wnd = arithmetic right shift wb by lit5 1 1 n,z 5 bclr bclr f,#bit4 bit clear f 1 1 none bclr ws,#bit4 bit clear ws 1 1 none 6 bra bra c,expr branch if carry 1 1 (4) none bra ge,expr branch if greater than or equal 1 1 (4) none bra geu,expr branch if unsigned greater than or equal 1 1 (4) none bra gt,expr branch if greater than 1 1 (4) none bra gtu,expr branch if unsigned greater than 1 1 (4) none bra le,expr branch if less than or equal 1 1 (4) none bra leu,expr branch if unsigned less than or equal 1 1 (4) none bra lt,expr branch if less than 1 1 (4) none bra ltu,expr branch if unsigned less than 1 1 (4) none bra n,expr branch if negative 1 1 (4) none bra nc,expr branch if not carry 1 1 (4) none bra nn,expr branch if not negative 1 1 (4) none bra nov,expr branch if not overflow 1 1 (4) none bra nz,expr branch if not zero 1 1 (4) none bra oa,expr branch if accumulator a overflow 1 1 (4) none bra ob,expr branch if accumulator b overflow 1 1 (4) none bra ov,expr branch if overflow 1 1 (4) none bra sa,expr branch if accumulator a saturated 1 1 (4) none bra sb,expr branch if accumulator b saturated 1 1 (4) none bra expr branch unconditionally 1 4 none bra z,expr branch if zero 1 1 (4) none bra wn computed branch 1 4 none 7 bset bset f,#bit4 bit set f 1 1 none bset ws,#bit4 bit set ws 1 1 none note: read and read-modify-write (e.g., bit operations and logical o perations) on non-cpu sfrs incur an additional instruction cycle. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 423 dspic33epxxxgm3xx/6xx/7xx 8 bsw bsw.c ws,wb write c bit to ws 1 1 none bsw.z ws,wb write z bit to ws 1 1 none 9 btg btg f,#bit4 bit toggle f 1 1 none btg ws,#bit4 bit toggle ws 1 1 none 10 btsc btsc f,#bit4 bit test f, skip if clear 1 1 (2 or 3) none btsc ws,#bit4 bit test ws, skip if clear 1 1 (2 or 3) none 11 btss btss f,#bit4 bit test f, skip if set 1 1 (2 or 3) none btss ws,#bit4 bit test ws, skip if set 1 1 (2 or 3) none 12 btst btst f,#bit4 bit test f 1 1 z btst.c ws,#bit4 bit test ws to c 1 1 c btst.z ws,#bit4 bit test ws to z 1 1 z btst.c ws,wb bit test ws to c 1 1 c btst.z ws,wb bit test ws to z 1 1 z 13 btsts btsts f,#bit4 bit test then set f 1 1 z btsts.c ws,#bit4 bit test ws to c, then set 1 1 c btsts.z ws,#bit4 bit test ws to z, then set 1 1 z 14 call call lit23 call subroutine 2 4 sfa call wn call indirect subroutine 1 4 sfa call.l wn call indirect subroutine (long address) 1 4 sfa 15 clr clr f f = 0x0000 1 1 none clr wreg wreg = 0x0000 1 1 none clr ws ws = 0x0000 1 1 none clr acc,wx,wxd,wy,wyd,awb clear accumulator 1 1 oa,ob,sa, sb 16 clrwdt clrwdt clear watchdog timer 1 1 wdto,sleep 17 com com f f = f 11 n , z com f,wreg wreg = f 11 n , z com ws,wd wd = ws 11 n , z 18 cp cp f compare f with wreg 1 1 c,dc,n,ov,z cp wb,#lit8 compare wb with lit8 1 1 c,dc,n,ov,z cp wb,ws compare wb with ws (wb C ws) 1 1 c,dc,n,ov,z 19 cp0 cp0 f compare f with 0x0000 1 1 c,dc,n,ov,z cp0 ws compare ws with 0x0000 1 1 c,dc,n,ov,z 20 cpb cpb f compare f with wreg, with borrow 1 1 c,dc,n,ov,z cpb wb,#lit8 compare wb with lit8, with borrow 1 1 c,dc,n,ov,z cpb wb,ws compare wb with ws, with borrow (wb C ws C c ) 1 1 c,dc,n,ov,z 21 cpseq cpseq wb,wn compare wb with wn, skip if = 1 1 (2 or 3) none cpbeq cpbeq wb,wn,expr compare wb with wn, branch if = 1 1 (5) none 22 cpsgt cpsgt wb,wn compare wb with wn, skip if > 1 1 (2 or 3) none cpbgt cpbgt wb,wn,expr compare wb with wn, branch if > 1 1 (5) none 23 cpslt cpslt wb,wn compare wb with wn, skip if < 1 1 (2 or 3) none cpblt cpblt wb,wn,expr compare wb with wn, branch if < 1 1 (5) none 24 cpsne cpsne wb,wn compare wb with wn, skip if ? 11 (2 or 3) none cpbne cpbne wb,wn,expr compare wb with wn, branch if ? 11 ( 5 ) n o n e table 31-2: instruction set overview (continued) base instr # assembly mnemonic assembly syntax description # of words # of cycles status flags affected note: read and read-modify-write (e.g., bit operations and logical o perations) on non-cpu sfrs incur an additional instruction cycle. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 424 ? 2013-2014 microchip technology inc. 25 daw daw wn wn = decimal adjust wn 1 1 c 26 dec dec f f = f C 1 1 1 c,dc,n,ov,z dec f,wreg wreg = f C 1 1 1 c,dc,n,ov,z dec ws,wd wd = ws C 1 1 1 c,dc,n,ov,z 27 dec2 dec2 f f = f C 2 1 1 c,dc,n,ov,z dec2 f,wreg wreg = f C 2 1 1 c,dc,n,ov,z dec2 ws,wd wd = ws C 2 1 1 c,dc,n,ov,z 28 disi disi #lit14 disable interrupts for k instruction cycles 1 1 none 29 div div.s wm,wn signed 16/16-bit integer divide 1 18 n,z,c,ov div.sd wm,wn signed 32/16-bit integer divide 1 18 n,z,c,ov div.u wm,wn unsigned 16/16-bit integer divide 1 18 n,z,c,ov div.ud wm,wn unsigned 32/16-bit integer divide 1 18 n,z,c,ov 30 divf divf wm,wn signed 16/16-bit fractional divide 1 18 n,z,c,ov 31 do do #lit15,expr do code to pc + expr, lit15 + 1 times 2 2 none do wn,expr do code to pc + expr, (wn) + 1 times 2 2 none 32 ed ed wm*wm,acc,wx,wy,wxd euclidean distance (no accumulate) 1 1 oa,ob,oab, sa,sb,sab 33 edac edac wm*wm,acc,wx,wy,wxd euclidean distance 1 1 oa,ob,oab, sa,sb,sab 34 exch exch wns,wnd swap wns with wnd 1 1 none 35 fbcl fbcl ws,wnd find bit change from left (msb) side 1 1 c 36 ff1l ff1l ws,wnd find first one from left (msb) side 1 1 c 37 ff1r ff1r ws,wnd find first one from right (lsb) side 1 1 c 38 goto goto expr go to address 2 4 none goto wn go to indirect 1 4 none goto.l wn go to indirect (long address) 1 4 none 39 inc inc f f = f + 1 1 1 c,dc,n,ov,z inc f,wreg wreg = f + 1 1 1 c,dc,n,ov,z inc ws,wd wd = ws + 1 1 1 c,dc,n,ov,z 40 inc2 inc2 f f = f + 2 1 1 c,dc,n,ov,z inc2 f,wreg wreg = f + 2 1 1 c,dc,n,ov,z inc2 ws,wd wd = ws + 2 1 1 c,dc,n,ov,z 41 ior ior f f = f .ior. wreg 1 1 n,z ior f,wreg wreg = f .ior. wreg 1 1 n,z ior #lit10,wn wd = lit10 .ior. wd 1 1 n,z ior wb,ws,wd wd = wb .ior. ws 1 1 n,z ior wb,#lit5,wd wd = wb .ior. lit5 1 1 n,z 42 lac lac wso,#slit4,acc load accumulator 1 1 oa,ob,oab, sa,sb,sab 43 lnk lnk #lit14 link frame pointer 1 1 sfa 44 lsr lsr f f = logical right shift f 1 1 c,n,ov,z lsr f,wreg wreg = logical right shift f 1 1 c,n,ov,z lsr ws,wd wd = logical right shift ws 1 1 c,n,ov,z lsr wb,wns,wnd wnd = logical right shift wb by wns 1 1 n,z lsr wb,#lit5,wnd wnd = logical right shift wb by lit5 1 1 n,z 45 mac mac wm*wn,acc,wx,wxd,wy,wyd,awb multiply and accumulate 1 1 oa,ob,oab, sa,sb,sab mac wm*wm,acc,wx,wxd,wy,wyd square and accumulate 1 1 oa,ob,oab, sa,sb,sab table 31-2: instruction set overview (continued) base instr # assembly mnemonic assembly syntax description # of words # of cycles status flags affected note: read and read-modify-write (e.g., bit operations and logical o perations) on non-cpu sfrs incur an additional instruction cycle. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 425 dspic33epxxxgm3xx/6xx/7xx 46 mov mov f,wn move f to wn 1 1 none mov f move f to f 1 1 none mov f,wreg move f to wreg 1 1 none mov #lit16,wn move 16-bit literal to wn 1 1 none mov.b #lit8,wn move 8-bit literal to wn 1 1 none mov wn,f move wn to f 1 1 none mov wso,wdo move ws to wd 1 1 none mov wreg,f move wreg to f 1 1 none mov.d wns,wd move double from w(ns):w(ns + 1) to wd 1 2 none mov.d ws,wnd move double from ws to w(nd + 1):w(nd) 1 2 none 47 movpag movpag #lit10,dsrpag move 10-bit literal to dsrpag 1 1 none movpag #lit9,dswpag move 9-bit literal to dswpag 1 1 none movpag #lit8,tblpag move 8-bit literal to tblpag 1 1 none movpagw ws, dsrpag move ws<9:0> to dsrpag 1 1 none movpagw ws, dswpag move ws<8:0> to dswpag 1 1 none movpagw ws, tblpag move ws<7:0> to tblpag 1 1 none 48 movsac movsac acc,wx,wxd,wy,wyd,awb prefetch and store accumulator 1 1 none 49 mpy mpy wm*wn,acc,wx,wxd,wy,wyd multiply wm by wn to accumulator 1 1 oa,ob,oab, sa,sb,sab mpy wm*wm,acc,wx,wxd,wy,wyd square wm to accumulator 1 1 oa,ob,oab, sa,sb,sab 50 mpy.n mpy.n wm*wn,acc,wx,wxd,wy,wyd -(multiply wm by wn) to accumulator 1 1 none 51 msc msc wm*wm,acc,wx,wxd,wy,wyd,awb multiply and subtract from accumulator 1 1 oa,ob,oab, sa,sb,sab 52 mul mul.ss wb,ws,wnd {wnd + 1, wnd} = signed(wb) * signed(ws) 11 n o n e mul.ss wb,ws,acc accumulator = signed(wb) * signed(ws) 1 1 none mul.su wb,ws,wnd {wnd + 1, wnd} = signed(wb) * unsigned(ws) 11 n o n e mul.su wb,ws,acc accumulator = signed(wb) * unsigned(ws) 11 n o n e mul.su wb,#lit5,acc accumulator = signed(wb) * unsigned(lit5) 1 1 none mul.us wb,ws,wnd {wnd + 1, wnd} = unsigned(wb) * signed(ws) 11 n o n e mul.us wb,ws,acc accumulator = unsigned(wb) * signed(ws) 11 n o n e mul.uu wb,ws,wnd {wnd + 1, wnd} = unsigned(wb) * unsigned(ws) 11 n o n e mul.uu wb,#lit5,acc accumulator = unsigned(wb) * unsigned(lit5) 11 n o n e mul.uu wb,ws,acc accumulator = unsigned(wb) * unsigned(ws) 11 n o n e mulw.ss wb,ws,wnd wnd = signed(wb) * signed(ws) 1 1 none mulw.su wb,ws,wnd wnd = signed(wb) * unsigned(ws) 1 1 none mulw.us wb,ws,wnd wnd = unsigned(wb) * signed(ws) 1 1 none mulw.uu wb,ws,wnd wnd = unsigned(wb) * unsigned(ws) 1 1 none mul.su wb,#lit5,wnd {wnd + 1, wnd} = signed(wb) * unsigned(lit5) 11 n o n e mul.su wb,#lit5,wnd wnd = signed(wb) * unsigned(lit5) 1 1 none mul.uu wb,#lit5,wnd {wnd + 1, wnd} = unsigned(wb) * unsigned(lit5) 11 n o n e mul.uu wb,#lit5,wnd wnd = unsigned(wb) * unsigned(lit5) 1 1 none mul f w3:w2 = f * wreg 1 1 none table 31-2: instruction set overview (continued) base instr # assembly mnemonic assembly syntax description # of words # of cycles status flags affected note: read and read-modify-write (e.g., bit operations and logical o perations) on non-cpu sfrs incur an additional instruction cycle. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 426 ? 2013-2014 microchip technology inc. 53 neg neg acc negate accumulator 1 1 oa,ob,oab, sa,sb,sab neg f f = f + 1 1 1 c,dc,n,ov,z neg f,wreg wreg = f + 1 1 1 c,dc,n,ov,z neg ws,wd wd = ws + 1 1 1 c,dc,n,ov,z 54 nop nop no operation 1 1 none nopr no operation 1 1 none 55 pop pop f pop f from top-of-stack (tos) 1 1 none pop wdo pop from top-of-stack (tos) to wdo 1 1 none pop.d wnd pop from top-of-stack (tos) to w(nd):w(nd + 1) 12 n o n e pop.s pop shadow registers 1 1 all 56 push push f push f to top-of-stack (tos) 1 1 none push wso push wso to top-of-stack (tos) 1 1 none push.d wns push w(ns):w(ns + 1) to top-of-stack (tos) 12 n o n e push.s push shadow registers 1 1 none 57 pwrsav pwrsav #lit1 go into sleep or idle mode 1 1 wdto,sleep 58 rcall rcall expr relative call 1 4 sfa rcall wn computed call 1 4 sfa 59 repeat repeat #lit15 repeat next instruction lit15 + 1 times 1 1 none repeat wn repeat next instruction (wn) + 1 times 1 1 none 60 reset reset software device reset 1 1 none 61 retfie retfie return from interrupt 1 6 (5) sfa 62 retlw retlw #lit10,wn return with literal in wn 1 6 (5) sfa 63 return return return from subroutine 1 6 (5) sfa 64 rlc rlc f f = rotate left through carry f 1 1 c,n,z rlc f,wreg wreg = rotate left through carry f 1 1 c,n,z rlc ws,wd wd = rotate left through carry ws 1 1 c,n,z 65 rlnc rlnc f f = rotate left (no carry) f 1 1 n,z rlnc f,wreg wreg = rotate left (no carry) f 1 1 n,z rlnc ws,wd wd = rotate left (no carry) ws 1 1 n,z 66 rrc rrc f f = rotate right through carry f 1 1 c,n,z rrc f,wreg wreg = rotate right through carry f 1 1 c,n,z rrc ws,wd wd = rotate right through carry ws 1 1 c,n,z 67 rrnc rrnc f f = rotate right (no carry) f 1 1 n,z rrnc f,wreg wreg = rotate right (no carry) f 1 1 n,z rrnc ws,wd wd = rotate right (no carry) ws 1 1 n,z 68 sac sac acc,#slit4,wdo store accumulator 1 1 none sac.r acc,#slit4,wdo store rounded accumulator 1 1 none 69 se se ws,wnd wnd = sign-extended ws 1 1 c,n,z 70 setm setm f f = 0xffff 1 1 none setm wreg wreg = 0xffff 1 1 none setm ws ws = 0xffff 1 1 none 71 sftac sftac acc,wn arithmetic shift accumulator by (wn) 1 1 oa,ob,oab, sa,sb,sab sftac acc,#slit6 arithmetic shift accumulator by slit6 1 1 oa,ob,oab, sa,sb,sab table 31-2: instruction set overview (continued) base instr # assembly mnemonic assembly syntax description # of words # of cycles status flags affected note: read and read-modify-write (e.g., bit operations and logical o perations) on non-cpu sfrs incur an additional instruction cycle. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 427 dspic33epxxxgm3xx/6xx/7xx 72 sl sl f f = left shift f 1 1 c,n,ov,z sl f,wreg wreg = left shift f 1 1 c,n,ov,z sl ws,wd wd = left shift ws 1 1 c,n,ov,z sl wb,wns,wnd wnd = left shift wb by wns 1 1 n,z sl wb,#lit5,wnd wnd = left shift wb by lit5 1 1 n,z 73 sub sub acc subtract accumulators 1 1 oa,ob,oab, sa,sb,sab sub f f = f C wreg 1 1 c,dc,n,ov,z sub f,wreg wreg = f C wreg 1 1 c,dc,n,ov,z sub #lit10,wn wn = wn C lit10 1 1 c,dc,n,ov,z sub wb,ws,wd wd = wb C ws 1 1 c,dc,n,ov,z sub wb,#lit5,wd wd = wb C lit5 1 1 c,dc,n,ov,z 74 subb subb f f = f C wreg C (c ) 1 1 c,dc,n,ov,z subb f,wreg wreg = f C wreg C (c ) 1 1 c,dc,n,ov,z subb #lit10,wn wn = wn C lit10 C (c ) 1 1 c,dc,n,ov,z subb wb,ws,wd wd = wb C ws C (c ) 1 1 c,dc,n,ov,z subb wb,#lit5,wd wd = wb C lit5 C (c ) 1 1 c,dc,n,ov,z 75 subr subr f f = wreg C f 1 1 c,dc,n,ov,z subr f,wreg wreg = wreg C f 1 1 c,dc,n,ov,z subr wb,ws,wd wd = ws C wb 1 1 c,dc,n,ov,z subr wb,#lit5,wd wd = lit5 C wb 1 1 c,dc,n,ov,z 76 subbr subbr f f = wreg C f C (c ) 1 1 c,dc,n,ov,z subbr f,wreg wreg = wreg C f C (c ) 1 1 c,dc,n,ov,z subbr wb,ws,wd wd = ws C wb C (c ) 1 1 c,dc,n,ov,z subbr wb,#lit5,wd wd = lit5 C wb C (c ) 1 1 c,dc,n,ov,z 77 swap swap.b wn wn = nibble swap wn 1 1 none swap wn wn = byte swap wn 1 1 none 78 tblrdh tblrdh ws,wd read prog<23:16> to wd<7:0> 1 5 none 79 tblrdl tblrdl ws,wd read prog<15:0> to wd 1 5 none 80 tblwth tblwth ws,wd write ws<7:0> to prog<23:16> 1 2 none 81 tblwtl tblwtl ws,wd write ws to prog<15:0> 1 2 none 82 ulnk ulnk unlink frame pointer 1 1 sfa 83 xor xor f f = f .xor. wreg 1 1 n,z xor f,wreg wreg = f .xor. wreg 1 1 n,z xor #lit10,wn wd = lit10 .xor. wd 1 1 n,z xor wb,ws,wd wd = wb .xor. ws 1 1 n,z xor wb,#lit5,wd wd = wb .xor. lit5 1 1 n,z 84 ze ze ws,wnd wnd = zero-extend ws 1 1 c,z,n table 31-2: instruction set overview (continued) base instr # assembly mnemonic assembly syntax description # of words # of cycles status flags affected note: read and read-modify-write (e.g., bit operations and logical o perations) on non-cpu sfrs incur an additional instruction cycle. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 428 ? 2013-2014 microchip technology inc. notes: downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 429 dspic33epxxxgm3xx/6xx/7xx 32.0 development support the pic ? microcontrollers (mcu) and dspic ? digital signal controllers (dsc) are supported with a full range of software and hardware development tools: integrated development environment - mplab ? x ide software compilers/assemblers/linkers - mplab xc compiler - mpasm tm assembler -mplink tm object linker/ mplib tm object librarian - mplab assembler/linker/librarian for various device families simulators - mplab x sim software simulator emulators - mplab real ice? in-circuit emulator in-circuit debuggers/programmers - mplab icd 3 - pickit? 3 device programmers - mplab pm3 device programmer low-cost demonstration/development boards, evaluation kits and starter kits third-party development tools 32.1 mplab x integrated development environment software the mplab x ide is a single, unified graphical user interface for microchip and third-party software, and hardware development tool that runs on windows ? , linux and mac os ? x. based on the netbeans ide, mplab x ide is an entirely new ide with a host of free software components and plug-ins for high- performance application development and debugging. moving between tools and upgrading from software simulators to hardware debugging and programming tools is simple with the seamless user interface. with complete project management, visual call graphs, a configurable watch window and a feature-rich editor that includes code completion and context menus, mplab x ide is flexible and friendly enough for new users. with the ability to support multiple tools on multiple projects with simultaneous debugging, mplab x ide is also suitable for the needs of experienced users. feature-rich editor: color syntax highlighting smart code completion makes suggestions and provides hints as you type automatic code formatting based on user-defined rules live parsing user-friendly, customizable interface: fully customizable interface: toolbars, toolbar buttons, windows, window placement, etc. call graph window project-based workspaces: multiple projects multiple tools multiple configurations simultaneous debugging sessions file history and bug tracking: local file history feature built-in support for bugzilla issue tracker downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 430 ? 2013-2014 microchip technology inc. 32.2 mplab xc compilers the mplab xc compilers are complete ansi c compilers for all of microchips 8, 16 and 32-bit mcu and dsc devices. these compilers provide powerful integration capabilities, superior code optimization and ease of use. mplab xc compilers run on windows, linux or mac os x. for easy source level debugging, the compilers provide debug information that is optimized to the mplab x ide. the free mplab xc compiler editions support all devices and commands, with no time or memory restrictions, and offer sufficient code optimization for most applications. mplab xc compilers include an assembler, linker and utilities. the assembler generates relocatable object files that can then be archived or linked with other relocatable object files and archives to create an exe- cutable file. mplab xc compiler uses the assembler to produce its object file. notable features of the assembler include: support for the entire device instruction set support for fixed-point and floating-point data command-line interface rich directive set flexible macro language mplab x ide compatibility 32.3 mpasm assembler the mpasm assembler is a full-featured, universal macro assembler for pic10/12/16/18 mcus. the mpasm assembler generates relocatable object files for the mplink object linker, intel ? standard hex files, map files to detail memory usage and symbol reference, absolute lst files that contain source lines and generated machine code, and coff files for debugging. the mpasm assembler features include: integration into mplab x ide projects user-defined macros to streamline assembly code conditional assembly for multipurpose source files directives that allow complete control over the assembly process 32.4 mplink object linker/ mplib object librarian the mplink object linker combines relocatable objects created by the mpasm assembler. it can link relocatable objects from precompiled libraries, using directives from a linker script. the mplib object librarian manages the creation and modification of library files of precompiled code. when a routine from a library is called from a source file, only the modules that contain that routine will be linked in with the application. this allows large libraries to be used efficiently in many different applications. the object linker/library features include: efficient linking of single libraries instead of many smaller files enhanced code maintainability by grouping related modules together flexible creation of libraries with easy module listing, replacement, deletion and extraction 32.5 mplab assembler, linker and librarian for various device families mplab assembler produces relocatable machine code from symbolic assembly language for pic24, pic32 and dspic dsc devices. mplab xc compiler uses the assembler to produce its object file. the assembler generates relocatable object files that can then be archived or linked with other relocatable object files and archives to create an executable file. notable features of the assembler include: support for the entire device instruction set support for fixed-point and floating-point data command-line interface rich directive set flexible macro language mplab x ide compatibility downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 431 dspic33epxxxgm3xx/6xx/7xx 32.6 mplab x sim software simulator the mplab x sim software simulator allows code development in a pc-hosted environment by simulat- ing the pic mcus and dspic dscs on an instruction level. on any given instruction, the data areas can be examined or modified and stimuli can be applied from a comprehensive stimulus controller. registers can be logged to files for further run-time analysis. the trace buffer and logic analyzer display extend the power of the simulator to record and track program execution, actions on i/o, most peripherals and internal registers. the mplab x sim software simulator fully supports symbolic debugging using the mplab xc compilers, and the mpasm and mplab assemblers. the soft- ware simulator offers the flexibility to develop and debug code outside of the hardware laboratory envi- ronment, making it an excellent, economical software development tool. 32.7 mplab real ice in-circuit emulator system the mplab real ice in-circuit emulator system is microchips next generation high-speed emulator for microchip flash dsc and mcu devices. it debugs and programs all 8, 16 and 32-bit mcu, and dsc devices with the easy-to-use, powerful graphical user interface of the mplab x ide. the emulator is connected to the design engineers pc using a high-speed usb 2.0 interface and is connected to the target with either a connector compatible with in-circuit debugger systems (rj-11) or with the new high-speed, noise tolerant, low- voltage differential signal (lvds) interconnection (cat5). the emulator is field upgradable through future firmware downloads in mplab x ide. mplab real ice offers significant advantages over competitive emulators including full-speed emulation, run-time variable watches, trace analysis, complex breakpoints, logic probes, a ruggedized probe interface and long (up to three meters) interconnection cables. 32.8 mplab icd 3 in-circuit debugger system the mplab icd 3 in-circuit debugger system is microchips most cost-effective, high-speed hardware debugger/programmer for microchip flash dsc and mcu devices. it debugs and programs pic flash microcontrollers and dspic dscs with the powerful, yet easy-to-use graphical user interface of the mplab ide. the mplab icd 3 in-circuit debugger probe is connected to the design engineers pc using a high- speed usb 2.0 interface and is connected to the target with a connector compatible with the mplab icd 2 or mplab real ice systems (rj-11). mplab icd 3 supports all mplab icd 2 headers. 32.9 pickit 3 in-circuit debugger/ programmer the mplab pickit 3 allows debugging and program- ming of pic and dspic flash microcontrollers at a most affordable price point using the powerful graphical user interface of the mplab ide. the mplab pickit 3 is connected to the design engineers pc using a full- speed usb interface and can be connected to the target via a microchip debug (rj-11) connector (com- patible with mplab icd 3 and mplab real ice). the connector uses two device i/o pins and the reset line to implement in-circuit debugging and in-circuit serial programming? (icsp?). 32.10 mplab pm3 device programmer the mplab pm3 device programmer is a universal, ce compliant device programmer with programmable voltage verification at v ddmin and v ddmax for maximum reliability. it features a large lcd display (128 x 64) for menus and error messages, and a mod- ular, detachable socket assembly to support various package types. the icsp cable assembly is included as a standard item. in stand-alone mode, the mplab pm3 device programmer can read, verify and program pic devices without a pc connection. it can also set code protection in this mode. the mplab pm3 connects to the host pc via an rs-232 or usb cable. the mplab pm3 has high-speed communications and optimized algorithms for quick programming of large memory devices, and incorporates an mmc card for file storage and data applications. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 432 ? 2013-2014 microchip technology inc. 32.11 demonstration/development boards, evaluation kits and starter kits a wide variety of demonstration, development and evaluation boards for various pic mcus and dspic dscs allows quick application development on fully functional systems. most boards include prototyping areas for adding custom circuitry and provide applica- tion firmware and source code for examination and modification. the boards support a variety of features, including leds, temperature sensors, switches, speakers, rs-232 interfaces, lcd displays, potentiometers and additional eeprom memory. the demonstration and development boards can be used in teaching environments, for prototyping custom circuits and for learning about various microcontroller applications. in addition to the picdem? and dspicdem? demonstration/development board series of circuits, microchip has a line of evaluation kits and demonstra- tion software for analog filter design, k ee l oq ? security ics, can, irda ? , powersmart battery management, seeval ? evaluation system, sigma-delta adc, flow rate sensing, plus many more. also available are starter kits that contain everything needed to experience the specified device. this usually includes a single application and debug capability, all on one board. check the microchip web page ( www.microchip.com ) for the complete list of demonstration, development and evaluation kits. 32.12 third-party development tools microchip also offers a great collection of tools from third-party vendors. these tools are carefully selected to offer good value and unique functionality. device programmers and gang programmers from companies, such as softlog and ccs software tools from companies, such as gimpel and trace systems protocol analyzers from companies, such as saleae and total phase demonstration boards from companies, such as mikroelektronika, digilent ? and olimex embedded ethernet solutions from companies, such as ez web lynx, wiznet and iplogika ? downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 433 dspic33epxxxgm3xx/6xx/7xx 33.0 electrical characteristics this section provides an overview of dspic33epxxxgm3xx/6xx/7xx electrical characteristics. additional information will be provided in future revisions of this document as it becomes available. absolute maximum ratings for the dspic33epxxxgm3xx/6xx/7xx family are listed below. exposure to these maximum rating conditions for extended periods may affect device reliability. functional operation of the device at these or any other conditions above the parameters indicated in the operation listings of this specification is not implied. absolute maximum ratings (see note 1 ) ambient temperature under bias................................................................................................. ............-40c to +125c storage temperature ............................................................................................................ .................. -65c to +160c voltage on v dd with respect to v ss .......................................................................................................... -0.3v to +4.0v voltage on any pin that is not 5v tolerant with respect to v ss ( 3 ) ..................................................... -0.3v to (v dd + 0.3v) voltage on any 5v tolerant pin with respect to v ss when v dd ? 3.0v ( 3 ) ................................................... -0.3v to +5.5v voltage on any 5v tolerant pin with respect to vss when v dd < 3.0v ( 3 ) ................................................... -0.3v to +3.6v voltage on v cap with respect to v ss ........................................................................................................ 1.62v to 1.98v maximum current out of v ss pin ........................................................................................................................... 350 ma maximum current into v dd pin ( 2 ) ...........................................................................................................................350 ma maximum current sunk by any i/o pin............................................................................................ .........................20 ma maximum current sourced by i/o pin ............................................................................................. .........................18 ma maximum current sourced/sunk by all ports ( 2 , 4 ) ....................................................................................................200 ma note 1: stresses above those listed under absolute maximum ratings may cause permanent damage to the device. this is a stress rating only and functional operation of the device at those or any other conditions above those indicated in the operational listings of this specification is not implied. exposure to maximum rating conditions for extended periods may affect device reliability. 2: maximum allowable current is a function of device maximum power dissipation (see tab l e 3 3- 2 ). 3: see the pin diagrams section for the 5v tolerant pins. 4: exceptions are: ra3, ra4, ra7, ra9, ra10, rb7-rb15, rc3, rc15, rd1-rd4, which are able to sink 30 ma and source 20 ma. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 434 ? 2013-2014 microchip technology inc. 33.1 dc characteristics table 33-1: operating mips vs. voltage characteristic v dd range (in volts) temperature range (in c) maximum mips dspic33epxxxgm3xx/6xx/7xx i-temp 3.0v to 3.6v ( 1 ) -40c to +85c 70 e-temp 3.0v to 3.6v ( 1 ) -40c to +125c 60 note 1: device is functional at v bormin < v dd < v ddmin . analog modules: adc, op amp/comparator and comparator voltage reference will have degraded performance. device functionality is tested but not characterized. refer to parameter bo10 in table 33-12 for the minimum and maximum bor values. table 33-2: thermal operating conditions rating symbol min. typ. max. unit industrial temperature devices: operating junction temperature range t j -40 +125 c operating ambient temperature range t a -40 +85 c extended temperature devices: operating junction temperature range t j -40 +140 c operating ambient temperature range t a -40 +125 c power dissipation: internal chip power dissipation: p int = v dd x (i dd ? ? i oh ) p d p int + p i / o w i/o pin power dissipation: i/o = ? ({v dd ? v oh } x i oh ) + ? (v ol x i ol ) maximum allowed power dissipation p dmax (t j C t a )/ ? ja w table 33-3: thermal packaging characteristics characteristic symbol typ. max. unit notes package thermal resistance, 121-pin bga ? ja 40 c/w 1 package thermal resistance, 100-pin tqfp 12x12 mm ? ja 43 c/w 1 package thermal resistance, 100-pin tqfp 14x14 mm ? ja c / w 1 package thermal resistance, 64-pin qfn ? ja 28.0 c/w 1 package thermal resistance, 64-pin tqfp 10x10 mm ? ja 48.3 c/w 1 package thermal resistance, 44-pin qfn ? ja 29.0 c/w 1 package thermal resistance, 44-pin tqfp 10x10 mm ? ja 49.8 c/w 1 package thermal resistance, 44-pin vtla 6x6 mm ? ja 25.2 c/w 1 package thermal resistance, 36-pin vtla 5x5 mm ? ja 28.5 c/w 1 package thermal resistance, 28-pin qfn-s ? ja 30.0 c/w 1 package thermal resistance, 28-pin ssop ? ja 71.0 c/w 1 package thermal resistance, 28-pin soic ? ja 69.7 c/w 1 package thermal resistance, 28-pin spdip ? ja 60.0 c/w 1 note 1: junction to ambient thermal resistance, theta- ja ( ? ja ) numbers are achieved by package simulations. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 435 dspic33epxxxgm3xx/6xx/7xx table 33-5: filter capacitor (c efc ) specifications table 33-4: dc temperature and voltage specifications dc characteristics standard operating conditions (see note 3 ): 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristic min. typ. ( 1 ) max. units conditions operating voltage dc10 v dd supply voltage ( 3 ) 3.0 3.6 v dc12 v dr ram data retention voltage ( 2 ) 1.95 v dc16 v por v dd start voltage to ensure internal power-on reset signal v ss v dc17 s vdd v dd rise rate to ensure internal power-on reset signal 0.03 v/ms 0v-3.0v in 3 ms dc18 v core v dd core ( 3 ) internal regulator voltage 1.62 1.8 1.98 v voltage is dependent on load, temperature and v dd note 1: data in typical column is at 3.3v, +25c unless otherwise stated. 2: this is the limit to which v dd may be lowered without losing ram data. 3: device is functional at v bormin < v dd < v ddmin . analog modules: adc, op amp/comparator and comparator voltage reference will have degraded performance. device functionality is tested but not characterized. refer to parameter bo10 in table 33-12 for the minimum and maximum bor values. standard operating conditions (unless otherwise stated): operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristics min. typ. max. units comments c efc external filter capacitor value ( 1 ) 4.7 10 ? f capacitor must have a low series resistance (< 1 ohm) note 1: typical v cap voltage = 1.8 volts when v dd ? v ddmin . downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 436 ? 2013-2014 microchip technology inc. table 33-6: dc characteristics: operating current (i dd ) dc characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param. typ. ( 2 ) max. units conditions operating current (i dd ) ( 1 ) dc20d 6.0 18.0 ma -40c 3.3v 10 mips dc20a 6.0 18.0 ma +25c dc20b 6.0 18.0 ma +85c dc20c 6.0 18.0 ma +125c dc21d 11.0 20.0 ma -40c 3.3v 20 mips dc21a 11.0 20.0 ma +25c dc21b 11.0 20.0 ma +85c dc21c 11.0 20.0 ma +125c dc22d 17.0 30.0 ma -40c 3.3v 40 mips dc22a 17.0 30.0 ma +25c dc22b 17.0 30.0 ma +85c dc22c 17.0 30.0 ma +125c dc23d 25.0 50.0 ma -40c 3.3v 60 mips dc23a 25.0 50.0 ma +25c dc23b 25.0 50.0 ma +85c dc23c 25.0 50.0 ma +125c dc24d 30.0 60.0 ma -40c 3.3v 70 mips dc24a 30.0 60.0 ma +25c dc24b 30.0 60.0 ma +85c note 1: i dd is primarily a function of the operating voltage and frequency. other factors, such as i/o pin loading and switching rate, oscillator type, internal code execution pattern and temperature, also have an impact on the current consumption. the test conditions for all i dd measurements are as follows: oscillator is configured in ec mode and external clock is active, osc1 is driven with external square wave from rail-to-rail (ec clock overshoot/undershoot < 250 mv required) clko is configured as an i/o input pin in the configuration word all i/o pins are configured as outputs and driving low mclr = v dd , wdt and fscm are disabled cpu, sram, program memory and data memory are operational no peripheral modules are operating or being clocked (defined pmdx bits are all ones) cpu executing while(1) { nop(); } jtag is disabled 2: data in typ column is at 3.3v, +25c unless otherwise stated. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 437 dspic33epxxxgm3xx/6xx/7xx table 33-7: dc characteristics: idle current (i idle ) dc characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended parameter no. typ. ( 2 ) max. units conditions idle current (i idle ) ( 1 ) dc40d 1.5 8.0 ma -40c 3.3v 10 mips dc40a 1.5 8.0 ma +25c dc40b 1.5 8.0 ma +85c dc40c 1.5 8.0 ma +125c dc41d 2.0 12.0 ma -40c 3.3v 20 mips dc41a 2.0 12.0 ma +25c dc41b 2.0 12.0 ma +85c dc41c 2.0 12.0 ma +125c dc42d 5.5 15.0 ma -40c 3.3v 40 mips dc42a 5.5 15.0 ma +25c 15.0 dc42b 5.5 ma +85c 15.0 dc42c 5.5 ma +125c dc43d 9.0 20.0 ma -40c 3.3v 60 mips dc43a 9.0 20.0 ma +25c 20.0 dc43b 9.0 ma +85c 20.0 dc43c 9.0 ma +125c dc44d 10.0 25.0 ma -40c 3.3v 70 mips dc44a 10.0 25.0 ma +25c 25.0 dc44b 10.0 ma +85c note 1: base idle current (i idle ) is measured as follows: cpu core is off, oscillator is configured in ec mode and external clock is active, osc1 is dr iven with external square wave from rail-to-rail (ec clock overshoot/undershoot < 250 mv required) clko is configured as an i/o input pin in the configuration word all i/o pins are configured as outputs and driving low m clr = v dd , wdt and fscm are disabled no peripheral modules are operating or being clocked (defined pmdx bits are all ones) the nvmsidl bit (nvmcon<12>) = 1 (i.e., flash regulator is set to standby while the device is in idle mode) the vregsf bit (rcon<11>) = 0 (i.e., flash regulator is set to standby while the device is in sleep mode) jtag is disabled 2: data in the typical column is at 3.3v, +25c unless otherwise specified. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 438 ? 2013-2014 microchip technology inc. table 33-8: dc characteristics: power-down current (i pd ) dc characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended parameter no. typ. ( 2 ) max. units conditions power-down current (i pd ) ( 1 ) dc60d 35 100 ? a- 4 0 c 3.3v base power-down current dc60c 40 200 ? a+ 2 5 c dc60b 250 500 ? a+ 8 5 c dc60c 1000 2500 ? a +125c dc61d 8 10 ? a- 4 0 c 3.3v watchdog timer current: ? i wdt ( 3 ) dc61c 10 15 ? a+ 2 5 c dc61b 12 20 ? a+ 8 5 c dc61c 13 25 ? a +125c note 1: i pd (sleep) current is measured as follows: cpu core is off, oscillator is configured in ec mode and external clock is active, osc1 is dr iven with external square wave from rail-to-rail (ec clock overshoot/undershoot < 250 mv required) clko is configured as an i/o input pin in the configuration word all i/o pins are configured as outputs and driving low mclr = v dd , wdt and fscm are disabled all peripheral modules are disabled (pmdx bits are all ones) the vregs bit (rcon<8>) = 0 (i.e., core regulator is set to standby while the device is in sleep mode) the vregsf bit (rcon<11>) = 0 (i.e., flash regulator is set to standby while the device is in sleep mode) jtag is disabled 2: data in the typical column is at 3.3v, +25oc unless otherwise specified. 3: the ? current is the additional current consumed when the module is enabled. this current should be added to the base i pd current. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 439 dspic33epxxxgm3xx/6xx/7xx table 33-9: dc characteristics: doze current (i doze ) dc characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended parameter no. typ. ( 2 ) max. doze ratio units conditions doze current (i doze ) ( 1 ) dc73a 20 53 1:2 ma -40c 3.3v 70 mips dc73g 8 30 1:128 ma dc70a 19 53 1:2 ma +25c 3.3v 60 mips dc70g 8 30 1:128 ma dc71a 20 53 1:2 ma +85c 3.3v 60 mips dc71g 10 30 1:128 ma dc72a 25 42 1:2 ma +125c 3.3v 50 mips dc72g 12 30 1:128 ma note 1: i doze is primarily a function of the operating voltage and frequency. other factors, such as i/o pin loading and switching rate, oscillator type, internal code execution pattern and temperature, also have an impact on the current consumption. the test conditions for all i doze measurements are as follows: oscillator is configured in ec mode and external clock is active, osc 1 is driven with external square wave from rail-to-rail (ec clock overshoot/undershoot < 250 mv required) clko is configured as an i/o input pin in the configuration word all i/o pins are configured as outputs and driving low m clr = v dd , wdt and fscm are disabled cpu, sram, program memory and data memory are operational no peripheral modules are operating or being clocked (defined pmdx bits are all ones) cpu executing while(1) { nop(); } jtag is disabled 2: data in the typical column is at 3.3v, +25c unless otherwise specified. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 440 ? 2013-2014 microchip technology inc. table 33-10: dc characteristics: i/o pin input specifications dc characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristic min. typ. max. units conditions v il input low voltage di10 any i/o pin and mclr v ss 0 . 2 v dd v di18 i/o pins with sdax, sclx v ss 0 . 3 v dd v smbus disabled di19 i/o pins with sdax, sclx v ss 0.8 v smbus enabled v ih input high voltage di20 i/o pins not 5v tolerant 0.8 v dd v dd v (note 3 ) i/o pins 5v tolerant and mclr 0.8 v dd 5 . 5v (note 3 ) i/o pins with sdax, sclx 0.8 v dd 5.5 v smbus disabled i/o pins with sdax, sclx 2.1 5.5 v smbus enabled i cnpu change notification pull-up current di30 150 250 550 ? av dd = 3.3v, v pin = v ss i cnpd change notification pull-down current ( 4 ) di31 20 50 100 ? av dd = 3.3v, v pin = v dd note 1: the leakage current on the mclr pin is strongly dependent on the applied voltage level. the specified levels represent normal operating conditions. higher leakage current can be measured at different input voltages. 2: negative current is defined as current sourced by the pin. 3: see the pin diagrams section for the 5v tolerant i/o pins. 4: v il source < (v ss C 0.3). characterized but not tested. 5: non-5v tolerant pins v ih source > (v dd + 0.3), 5v tolerant pins v ih source > 5.5v. characterized but not tested. 6: digital 5v tolerant pins cannot tolerate any positive input injection current from input sources > 5.5v. 7: non-zero injection currents can affect the adc results by approximately 4-6 counts. 8: any number and/or combination of i/o pins not excluded under i icl or i ich conditions are permitted provided the mathematical absolute instantaneous sum of the input injection currents from all pins do not exceed the specified limit. characterized but not tested. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 441 dspic33epxxxgm3xx/6xx/7xx i il input leakage current ( 1 , 2 ) di50 i/o pins 5v tolerant ( 3 ) -1 +1 ? av ss ? v pin ? 5v, pin at high-impedance di51 i/o pins not 5v tolerant ( 3 ) -1 +1 ? av ss ? v pin ? v dd , pin at high-impedance, -40c ? t a ? +85c di51a i/o pins not 5v tolerant ( 3 ) -1 +1 ? a analog pins shared with external reference pins, -40c ? t a ? +85c di51b i/o pins not 5v tolerant ( 3 ) -1 +1 ? av ss ? v pin ? v dd , pin at high-impedance, -40c ? t a ? +125c di51c i/o pins not 5v tolerant ( 3 ) -1 +1 ? a analog pins shared with external reference pins, -40c ? t a ? +125c di55 mclr -5 +5 ? av ss ?? v pin ?? v dd di56 osc1 -5 +5 ? av ss ?? v pin ?? v dd , xt and hs modes table 33-10: dc characteristics: i/o pi n input specifications (continued) dc characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristic min. typ. max. units conditions note 1: the leakage current on the mclr pin is strongly dependent on the applied voltage level. the specified levels represent normal operating conditions. higher leakage current can be measured at different input voltages. 2: negative current is defined as current sourced by the pin. 3: see the pin diagrams section for the 5v tolerant i/o pins. 4: v il source < (v ss C 0.3). characterized but not tested. 5: non-5v tolerant pins v ih source > (v dd + 0.3), 5v tolerant pins v ih source > 5.5v. characterized but not tested. 6: digital 5v tolerant pins cannot tolerate any positive input injection current from input sources > 5.5v. 7: non-zero injection currents can affect the adc results by approximately 4-6 counts. 8: any number and/or combination of i/o pins not excluded under i icl or i ich conditions are permitted provided the mathematical absolute instantaneous sum of the input injection currents from all pins do not exceed the specified limit. characterized but not tested. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 442 ? 2013-2014 microchip technology inc. i icl input low injection current di60a 0 -5 ( 4 , 7 ) ma all pins except v dd , v ss , av dd , av ss , mclr , v cap and rb7 i ich input high injection current di60b 0 +5 ( 5 , 6 , 7 ) ma all pins except v dd , v ss , av dd , av ss , mclr , v cap , rb7 and all 5v tolerant pins ( 6 ) ? i ict total input injection current di60c (sum of all i/o and control pins) -20 ( 8 ) + 2 0 ( 8 ) ma absolute instantaneous sum of all input injection currents from all i/o pins: ( | iicl | + | iich | ) ? ? i ict table 33-10: dc characteristics: i/o pi n input specifications (continued) dc characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristic min. typ. max. units conditions note 1: the leakage current on the mclr pin is strongly dependent on the applied voltage level. the specified levels represent normal operating conditions. higher leakage current can be measured at different input voltages. 2: negative current is defined as current sourced by the pin. 3: see the pin diagrams section for the 5v tolerant i/o pins. 4: v il source < (v ss C 0.3). characterized but not tested. 5: non-5v tolerant pins v ih source > (v dd + 0.3), 5v tolerant pins v ih source > 5.5v. characterized but not tested. 6: digital 5v tolerant pins cannot tolerate any positive input injection current from input sources > 5.5v. 7: non-zero injection currents can affect the adc results by approximately 4-6 counts. 8: any number and/or combination of i/o pins not excluded under i icl or i ich conditions are permitted provided the mathematical absolute instantaneous sum of the input injection currents from all pins do not exceed the specified limit. characterized but not tested. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 443 dspic33epxxxgm3xx/6xx/7xx table 33-11: dc characteristics: i/o pin output specifications dc characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param. symbol characteristic min. typ. max. units conditions do10 v ol output low voltage 4x sink driver pins ( 1 ) 0 . 4vv dd = 3.3v, i ol ? 6 ma, -40c ? t a ? +85c, i ol ? 5 ma, +85c ? t a ? +125c output low voltage 8x sink driver pins ( 2 ) 0 . 4vv dd = 3.3v, i ol ? 12 ma, -40c ? t a ? +85c, i ol ? 8 ma, +85c ? t a ? +125c do20 v oh output high voltage 4x source driver pins ( 1 ) 2.4 v i oh ? -10 ma, v dd = 3.3v output high voltage 8x source driver pins ( 2 ) 2.4 v i oh ? -15 ma, v dd = 3.3v do20a v oh 1 output high voltage 4x source driver pins ( 1 ) 1.5 v i oh ? -14 ma, v dd = 3.3v 2.0 i oh ? -12 ma, v dd = 3.3v 3.0 i oh ? -7 ma, v dd = 3.3v output high voltage 8x source driver pins ( 2 ) 1.5 v i oh ? -22 ma, v dd = 3.3v 2.0 i oh ? -18 ma, v dd = 3.3v 3.0 i oh ? -10 ma, v dd = 3.3v note 1: includes all i/o pins that are not 8x sink driver pins (see below). 2: includes the following pins: for 44-pin devices: ra3, ra4, ra7, ra9, ra10, rb7, rb<15:9>, rc1 and rc<9:3> for 64-pin devices: ra4, ra7, ra<10:9>, rb7, rb<15:9>, rc1, rc<9:3>, rc15 and rg<8:7> for 100-pin devices: ra4, ra7, ra9, ra10, rb7, rb<15:9>, rc1, rc<9:3>, rc15, rd<3:1> and rg<8:6> table 33-12: electrical characteristics: bor dc characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristic min. ( 1 ) typ. max. units conditions bo10 v bor bor event on v dd transition high-to-low 2.7 2.95 v v dd (note 2 , note 3 ) po10 v por por event on v dd transition high-to-low 1.75 1.95 v (note 2 ) note 1: parameters are for design guidance only and are not tested in manufacturing. 2: the v bor specification is relative to v dd . 3: the device is functional at v bormin < v dd < v ddmin . analog modules: adc, op amp/comparator and comparator voltage reference will have degraded performance. device functionality is tested but not characterized. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 444 ? 2013-2014 microchip technology inc. table 33-13: dc characteristics: program memory dc characteristics standard operating conditions: v bor (min) v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristic min typ ( 1 ) max units conditions program flash memory d130 e p cell endurance 10,000 e/w -40 ? c to +125 ? c d131 v pr v dd for read v bormin 3 . 6v d132b v pew v dd for self-timed write 3.0 3.6 v d134 t retd characteristic retention 20 year provided no other specifications are violated, -40 ? c to +125 ? c d135 i ddp supply current during programming 1 0m a d138a t ww word write cycle time 46.5 46.9 47.4 s t ww = 346 frc cycles, t a = +85c (note 2 ) d138b t ww word write cycle time 46.0 47.9 s t ww = 346 frc cycles, t a = +125c (note 2 ) d136a t pe row write time 0.667 0.673 0.680 ms t rw = 4965 frc cycles, t a = +85c (note 2 ) d136b t pe row write time 0.660 0.687 ms t rw = 4965 frc cycles, t a = +125c (note 2 ) d137a t pe page erase time 19.6 20 20.1 ms t pe = 146893 frc cycles, t a = +85c (note 2 ) d137b t pe page erase time 19.5 20.3 ms t pe = 146893 frc cycles, t a = +125c (note 2 ) note 1: data in typ column is at 3.3v, +25c unless otherwise stated. 2: other conditions: frc = 7.3728 mhz, tun<5:0> = b'011111 (for min), tun<5:0> = b'100000 (for max). this parameter depends on the frc accuracy (see table 33-19 ) and the value of the frc oscillator tuning register. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 445 dspic33epxxxgm3xx/6xx/7xx 33.2 ac characteristics and timing parameters this section defines the dspic33epxxxgm3xx/6xx/ 7xx ac characteristics and timing parameters. table 33-14: temperature and vo ltage specifications C ac figure 33-1: load conditions for device timing specifications table 33-15: capacitiv e loading requirements on output pins ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended operating voltage v dd range as described in section 33.1 dc characteristics . param no. symbol characteristic min. typ. max. units conditions do50 c osco osc2 pin 15 pf in xt and hs modes, when external clock is used to drive osc1 do56 c io all i/o pins and osc2 50 pf ec mode do58 c b sclx, sdax 400 pf in i 2 c? mode v dd /2 c l r l pin pin v ss v ss c l r l =464 ? c l = 50 pf for all pins except osc2 15 pf for osc2 output load condition 1 C for all pins except osc2 load condition 2 C for osc2 downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 446 ? 2013-2014 microchip technology inc. figure 33-2: external clock timing q1 q2 q3 q4 osc1 clko q1 q2 q3 q4 os20 os30 os30 os40 os41 os31 os31 os25 table 33-16: external clo ck timing requirements ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symb characteristic min. typ. ( 1 ) max. units conditions os10 f in external clki frequency (external clocks allowed only in ec and ecpll modes) dc 60 mhz ec oscillator crystal frequency 3.5 10 32.4 32.768 1025 33.1 mhzmhz khz xths sosc os20 t osc t osc = 1/f osc 8.33 dc ns t a = +125oc t osc = 1/f osc 7.14 dc ns t a = +85oc os25 t cy instruction cycle time ( 2 ) 16.67 dc ns t a = +125oc 14.28 dc ns t a = +85oc os30 tosl, to s h external clock in (osc1) high or low time 0.375 x t osc 0.625 x t osc ns ec os31 tosr, to s f external clock in (osc1) rise or fall time 20 ns ec os40 tckr clko rise time ( 3 ) 5 . 2n s os41 tckf clko fall time ( 3 ) 5 . 2n s os42 g m external oscillator transconductance ( 4 ) 12 ma/v hs, v dd = 3.3v, t a = +25oc 6m a / v x t , v dd = 3.3v, t a = +25oc note 1: data in typical column is at 3.3v, +25c unless otherwise stated. 2: instruction cycle period (t cy ) equals two times the input oscillator time base period. all specified values are based on characterization data for that particular oscillator type under standard operating conditions with the device executing code. exceeding these specified limits may result in an unstable oscillator operation and/or higher than expected current consumption. all devices are tested to operate at minimum values with an external clock applied to the osc1 pin. when an ex ternal clock input is used, the maximum cycle time limit is dc (no clock) for all devices. 3: measurements are taken in ec mode. the clko signal is measured on the osc2 pin. 4: this parameter is characterized, but not tested in manufacturing. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 447 dspic33epxxxgm3xx/6xx/7xx table 33-17: pll clock ti ming specifications ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristic min. typ. ( 1 ) max. units conditions os50 f plli pll voltage controlled oscillator (vco) input frequency range 0.8 8.0 mhz ecpll, xtpll modes os51 f sys on-chip vco system frequency 120 340 mhz os52 t lock pll start-up time (lock time) 0.9 1.5 3.1 ms os53 d clk clko stability (jitter) ( 2 ) -3 0.5 3 % note 1: data in typical column is at 3.3v, +25c unless otherwise stated. parameters are for design guidance only and are not tested. 2: this jitter specification is based on clock cycle-by-clock cycle measurements. to get the effectiv e jitter for individual time bases or communication clocks used by the application, use the following formula: for example, if f osc = 120 mhz and the spi bit rate = 10 mhz, the effective jitter is as follows: effective jitter d clk f osc time base or communication clock -------------------------------------------------------------------------------------- - ------------------------------------------------------------------------------------------- = effective jitter d clk 120 10 -------- - ------------- - d clk 12 ------------- - d clk 3.464 ------------- - === table 33-18: internal frc accuracy ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. characteristic min. typ. max. units conditions internal frc accuracy @ frc frequency = 7.3728 mhz ( 1 ) f20a frc -1.5 0.5 +1.5 % -40c ? t a ?? +85c v dd = 3.0-3.6v f20b frc -2 1.5 +2 % -40c ? t a ?? +125c v dd = 3.0-3.6v note 1: frequency calibrated at +25c and 3.3v. tunx bits can be used to compensate for temperature drift. table 33-19: internal lprc accuracy ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. characteristic min. typ. max. units conditions lprc @ 32.768 khz f21a lprc -15 5 +15 % -40c ? t a ?? +85c v dd = 3.0-3.6v f21b lprc -30 10 +30 % -40c ? t a ?? +125c v dd = 3.0-3.6v downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 448 ? 2013-2014 microchip technology inc. figure 33-3: i/o timing characteristics figure 33-4: bor and master clear re set timing characteristics note: refer to figure 33-1 for load conditions. i/o pin (input) i/o pin (output) di35 old value new value di40 do31 do32 table 33-20: i/o timing requirements ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristic min. typ. ( 1 ) max. units conditions do31 t io r port output rise time 5 10 ns do32 t io f port output fall time 5 10 ns di35 t inp intx pin high or low time (input) 20 ns di40 t rbp cnx high or low time (input) 2 t cy note 1: data in typical column is at 3.3v, +25c unless otherwise stated. mclr (sy20) bor (sy30) t mclr t bor reset sequence cpu starts fetching code various delays (depending on configuration) downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 449 dspic33epxxxgm3xx/6xx/7xx figure 33-5: power-on reset timi ng characteristics v dd v por note 1: the power-up period will be extended if the power-up sequence completes before the device exits from bor (v dd < v bor ). 2: the power-up period includes internal voltage regulator stabilization delay. sy00 power-up sequence v dd v por (t pu ) sy10 sy11 power-up sequence (notes 1,2) cpu starts fetching code cpu starts fetching code (t pwrt ) power-up timer disabled C clock sources = (hs, hspll, xt and xtpll) v dd v por sy00 power-up sequence (t pu ) cpu starts fetching code (notes 1,2) (notes 1,2) power-up timer disabled C clock sources = (frc, frcdivn, frcdiv16, frcpll, ec, ecpll and lprc) power-up timer enabled C clock sources = (frc, frcdivn, frcdiv16, frcpll, ec, ecp ll and lprc) (t ost ) sy00 (t pu ) v dd v por greater of power-up sequence (notes 1,2) cpu starts fetching code power-up timer enabled C clock sources = (hs, hspll, xt and xtpll) sy00 (t pu ) sy11 (t pwrt ) sy10 (t ost ) or downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 450 ? 2013-2014 microchip technology inc. table 33-21: reset, watchdog timer, os cillator start-up timer and power-up timer timing requirements ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristic ( 1 ) min. typ. ( 2 ) max. units conditions sy00 t pu power-up period 400 600 s sy10 t ost oscillator start-up time 1024 t osc t osc = osc1 period sy12 t wdt watchdog timer time-out period 0.85 1.15 ms wdtpre = 0 , wdtpost<3:0> = 0000 , using lprc tolerances indicated in f21 (see table 33-19 ) at +85c 3.4 4.6 ms wdtpre = 1 , wdtpost<3:0> = 0000 , using lprc tolerances indicated in f21 (see table 33-19 ) at +85c sy13 t ioz i/o high-impedance from mclr low or watchdog timer reset 0.68 0.72 1.2 s sy20 t mclr mclr pulse width (low) 2 s sy30 t bor bor pulse width (low) 1 s sy35 t fscm fail-safe clock monitor delay 500 900 s -40c to +85c sy36 t vreg voltage regulator standby-to-active mode transition time 3 0 s sy37 t oscdfrc frc oscillator start-up delay 2 9 s sy38 t oscdlprc lprc oscillator start-up delay 7 0 s note 1: these parameters are characterized but not tested in manufacturing. 2: data in typical column is at 3.3v, +25c unless otherwise stated. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 451 dspic33epxxxgm3xx/6xx/7xx figure 33-6: timer1-timer5 external cl ock timing characteristics note: refer to figure 33-1 for load conditions. tx11 tx15 tx10 tx20 tmrx os60 txck table 33-22: timer1 external clock timing requirements ( 1 ) ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristic ( 2 ) min. typ. max. units conditions ta10 t tx h t1ck high time synchronous mode greater of: 20 or (t cy + 20)/n ns must also meet parameter ta15, n = prescaler value (1, 8, 64, 256) asynchronous 35 ns ta11 t tx lt 1 c k l o w time synchronous mode greater of: 20 or (t cy + 20)/n ns must also meet parameter ta15, n = prescaler value (1, 8, 64, 256) asynchronous 10 ns ta15 t tx p t1ck input period synchronous mode greater of: 40 or (2 t cy + 40)/n ns n = prescaler value (1, 8, 64, 256) os60 ft1 t1ck oscillator input frequency range (oscillator enabled by setting tcs (t1con<1>) bit) dc 50 khz ta20 t ckextmrl delay from external t1ck clock edge to timer increment 0.75 t cy + 40 1.75 t cy + 40 ns note 1: timer1 is a type a. 2: these parameters are characterized, but are not tested in manufacturing. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 452 ? 2013-2014 microchip technology inc. table 33-23: timer2 and timer4 (type b timer) external clock timing requirements ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristic ( 1 ) min. typ. max. units conditions tb10 t tx h txck high time synchronous mode greater of: 20 or (t cy + 20)/n ns must also meet parameter tb15, n = prescale value (1, 8, 64, 256) tb11 t tx lt x c k l o w time synchronous mode greater of: 20 or (t cy + 20)/n ns must also meet parameter tb15, n = prescale value (1, 8, 64, 256) tb15 t tx p txck input period synchronous mode greater of: 40 or (2 t cy + 40)/n ns n = prescale value (1, 8, 64, 256) tb20 t ckextmrl delay from external txck clock edge to timer increment 0.75 t cy + 40 1.75 t cy + 40 ns note 1: these parameters are characterized, but are not tested in manufacturing. table 33-24: timer3 and timer5 (type c timer) external clock timing requirements ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristic ( 1 ) min. typ. max. units conditions tc10 t tx ht x c k h i g h time synchronous t cy + 20 ns must also meet parameter tc15 tc11 t tx l txck low time synchronous t cy + 20 ns must also meet parameter tc15 tc15 t tx p txck input period synchronous, with prescaler 2 t cy + 40 ns n = prescale value (1, 8, 64, 256) tc20 t ckextmrl delay from external txck clock edge to timer increment 0.75 t cy + 40 1.75 t cy + 40 ns note 1: these parameters are characterized, but are not tested in manufacturing. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 453 dspic33epxxxgm3xx/6xx/7xx figure 33-7: input capture x (icx) timing characteristics icx ic10 ic11 ic15 note: refer to figure 33-1 for load conditions. table 33-25: input capture x (icx) timing requirements ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param. no. symbol characteristics ( 1 ) min. max. units conditions ic10 t cc l icx input low time greater of: 12.5 + 25 or (0.5 t cy /n) + 25 ns must also meet parameter ic15 n = prescale value (1, 4, 16) ic11 t cc h icx input high time greater of: 12.5 + 25 or (0.5 t cy /n) + 25 ns must also meet parameter ic15 ic15 t cc p icx input period greater of: 25 + 50 or (1 t cy /n) + 50 n s note 1: these parameters are characterized, but not tested in manufacturing. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 454 ? 2013-2014 microchip technology inc. figure 33-8: output compare x (ocx) timing characteristics figure 33-9: ocx/pwmx module timing characteristics table 33-26: output compare x (ocx) timing requirements ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristic ( 1 ) min. typ. max. units conditions oc10 t cc f ocx output fall time ns see parameter do32 oc11 t cc r ocx output rise time ns see parameter do31 note 1: these parameters are characterized but not tested in manufacturing. ocx oc11 oc10 (output compare note: refer to figure 33-1 for load conditions. or pwm mode) ocfa ocx oc20 oc15 table 33-27: ocx/pwmx mode timing requirements ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristic ( 1 ) min. typ. max. units conditions oc15 t fd fault input to pwmx i/o change t cy + 20 ns oc20 t flt fault input pulse width t cy + 20 ns note 1: these parameters are characterized but not tested in manufacturing. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 455 dspic33epxxxgm3xx/6xx/7xx figure 33-10: high-speed pwmx module fault timing characteristics figure 33-11: high-speed pwmx module timing characteristics fault input pwmx mp30 mp20 (active-low) pwmx mp11 mp10 note: refer to figure 33-1 for load conditions. table 33-28: high-speed pwmx module timing requirements ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristic ( 1 ) min. typ. max. units conditions mp10 t fpwm pwmx output fall time ns see parameter do32 mp11 t rpwm pwmx output rise time ns see parameter do31 mp20 t fd fault input ? to pwmx i/o change 1 5n s mp30 t fh fault input pulse width 15 ns note 1: these parameters are characterized but not tested in manufacturing. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 456 ? 2013-2014 microchip technology inc. figure 33-12: timerq (qeix module) exter nal clock timing characteristics tq11 tq15 tq10 tq20 qebx poscnt table 33-29: qeix module external clock timing requirements ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristic ( 1 ) min. typ. max. units conditions tq10 ttqh tqck high time synchronous, with prescaler greater of: 12.5 + 25 or (0.5 t cy /n) + 25 ns must also meet parameter tq15 tq11 ttql tqck low time synchronous, with prescaler greater of: 12.5 + 25 or (0.5 t cy /n) + 25 ns must also meet parameter tq15 tq15 ttqp tqcp input period synchronous, with prescaler greater of: 25 + 50 or (1 t cy /n) + 50 n s tq20 t ckextmrl delay from external txck clock edge to timer increment 1 t cy note 1: these parameters are characterized but not tested in manufacturing. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 457 dspic33epxxxgm3xx/6xx/7xx figure 33-13: qeax/qebx input characteristics tq30 tq35 qeax (input) tq35 qebx (input) tq36 qebx internal tq41 tq31 tq30 tq31 tq40 table 33-30: quadrature deco der timing requirements ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristic ( 1 ) typ. ( 2 ) max. units conditions tq30 t qu l quadrature input low time 6 t cy n s tq31 t qu h quadrature input high time 6 t cy n s tq35 t qu in quadrature input period 12 t cy n s tq36 t qu p quadrature phase period 3 t cy n s tq40 t quf l filter time to recognize low with digital filter 3 * n * t cy ns n = 1, 2, 4, 16, 32, 64, 128 and 256 (note 3 ) tq41 t quf h filter time to recognize high with digital filter 3 * n * t cy ns n = 1, 2, 4, 16, 32, 64, 128 and 256 (note 3 ) note 1: these parameters are characterized but not tested in manufacturing. 2: data in typical column is at 3.3v, +25c unless otherwise stated. parameters are for design guidance only and are not tested. 3: n = index channel digital filter clock divide select bits. refer to the ?dspic33/pic24 family reference manual , quadrature encoder interface (qei) (ds70601). please see the microchip web site for the latest dspic33/pic24 family reference manual sections. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 458 ? 2013-2014 microchip technology inc. figure 33-14: qeix modul e index pulse timing characteristics qeax (input) ungated index qebx (input) tq55 index internal position counter reset tq50 tq51 table 33-31: qeix index pulse timing requirements ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristic ( 1 ) min. max. units conditions tq50 tqil filter time to recognize low with digital filter 3 * n * t cy ns n = 1, 2, 4, 16, 32, 64, 128 and 256 (note 2 ) tq51 tqih filter time to recognize high with digital filter 3 * n * t cy ns n = 1, 2, 4, 16, 32, 64, 128 and 256 (note 2 ) tq55 tqidxr index pulse recognized to position counter reset (ungated index) 3 t cy n s note 1: these parameters are characterized but not tested in manufacturing. 2: alignment of index pulses to qeax and qebx is shown for position counter reset timing only. shown for forward direction only (qeax leads qebx). same timi ng applies for reverse direction (qeax lags qebx) but index pulse recognition occurs on falling edge. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 459 dspic33epxxxgm3xx/6xx/7xx table 33-32: spi2 and spi3 maximum data/clock rate summary figure 33-15: spi2 and spi3 master mode (half-duplex, transmit only, cke = 0 ) timing characteristics ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended maximum data rate master transmit only (half-duplex) master transmit/receive (full-duplex) slave transmit/receive (full-duplex) cke ckp smp 15 mhz table 33-33 0 , 10 , 10 , 1 9 mhz table 33-34 10 , 11 9 mhz table 33-35 00 , 11 15 mhz table 33-36 100 11 mhz table 33-37 110 15 mhz table 33-38 010 11 mhz table 33-39 000 sckx (ckp = 0 ) sckx (ckp = 1 ) sdox sp10 sp21 sp20 sp35 sp20 sp21 msb lsb bit 14 - - - - - -1 sp30, sp31 sp30, sp31 note: refer to figure 33-1 for load conditions. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 460 ? 2013-2014 microchip technology inc. figure 33-16: spi2 and spi3 master mode (half-duplex, transmit only, cke = 1 ) timing characteristics table 33-33: spi2 and spi3 master mode (half-duplex, transmit only) timing requirements ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param. symbol characteristic ( 1 ) min. typ. ( 2 ) max. units conditions sp10 fscp maximum sckx frequency 15 mhz (note 3 ) sp20 tscf sckx output fall time ns see parameter do32 (note 4 ) sp21 tscr sckx output rise time ns see parameter do31 (note 4 ) sp30 tdof sdox data output fall time ns see parameter do32 (note 4 ) sp31 tdor sdox data output rise time ns see parameter do31 (note 4 ) sp35 tsch2dov, tscl2dov sdox data output valid after sckx edge 62 0n s sp36 tdiv2sch, tdiv2scl sdox data output setup to first sckx edge 30 ns note 1: these parameters are characterized, but are not tested in manufacturing. 2: data in typical column is at 3.3v, +25c unless otherwise stated. 3: the minimum clock period for sckx is 66.7 ns. therefore, the clock generated in master mode must not violate this specification. 4: assumes 50 pf load on all spix pins. sckx (ckp = 0 ) sckx (ckp = 1 ) sdox sp21 sp20 sp35 sp20 sp21 msb lsb bit 14 - - - - - -1 sp30, sp31 note: refer to figure 33-1 for load conditions. sp36 sp10 downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 461 dspic33epxxxgm3xx/6xx/7xx figure 33-17: spi2 and spi3 master mode (full-duplex, cke = 1 , ckp = x , smp = 1 ) timing characteristics table 33-34: spi2 and spi3 master mode (full-duplex, cke = 1 , ckp = x , smp = 1 ) timing requirements ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param. symbol characteristic ( 1 ) min. typ. ( 2 ) max. units conditions sp10 fscp maximum sckx frequency 9 mhz (note 3 ) sp20 tscf sckx output fall time ns see parameter do32 (note 4 ) sp21 tscr sckx output rise time ns see parameter do31 (note 4 ) sp30 tdof sdox data output fall time ns see parameter do32 (note 4 ) sp31 tdor sdox data output rise time ns see parameter do31 (note 4 ) sp35 tsch2dov, tscl2dov sdox data output valid after sckx edge 62 0n s sp36 tdov2sc, tdov2scl sdox data output setup to first sckx edge 3 0 n s sp40 tdiv2sch, tdiv2scl setup time of sdix data input to sckx edge 3 0 n s sp41 tsch2dil, ts c l 2 d i l hold time of sdix data input to sckx edge 3 0 n s note 1: these parameters are characterized, but are not tested in manufacturing. 2: data in typical column is at 3.3v, +25c unless otherwise stated. 3: the minimum clock period for sckx is 111 ns. the clock generated in master mode must not violate this specification. 4: assumes 50 pf load on all spix pins. sckx (ckp = 0 ) sckx (ckp = 1 ) sdox sp21 sp20 sp35 sp20 sp21 msb lsb bit 14 - - - - - -1 sp30, sp31 note: refer to figure 33-1 for load conditions. sp36 sp41 lsb in bit 14 - - - -1 sdix sp40 msb in sp10 downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 462 ? 2013-2014 microchip technology inc. figure 33-18: spi2 and spi3 master mode (full-duplex, cke = 0 , ckp = x , smp = 1 ) timing characteristics table 33-35: spi2 and spi3 master mode (full-duplex, cke = 0 , ckp = x , smp = 1 ) timing requirements ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param. symbol characteristic ( 1 ) min. typ. ( 2 ) max. units conditions sp10 fscp maximum sckx frequency 9 mhz -40oc to +125oc (note 3 ) sp20 tscf sckx output fall time ns see parameter do32 (note 4 ) sp21 tscr sckx output rise time ns see parameter do31 (note 4 ) sp30 tdof sdox data output fall time ns see parameter do32 (note 4 ) sp31 tdor sdox data output rise time ns see parameter do31 (note 4 ) sp35 tsch2dov, tscl2dov sdox data output valid after sckx edge 62 0n s sp36 tdov2sch, tdov2scl sdox data output setup to first sckx edge 3 0 n s sp40 tdiv2sch, tdiv2scl setup time of sdix data input to sckx edge 3 0 n s sp41 tsch2dil, ts c l 2 d i l hold time of sdix data input to sckx edge 3 0 n s note 1: these parameters are characterized, but are not tested in manufacturing. 2: data in typical column is at 3.3v, +25c unless otherwise stated. 3: the minimum clock period for sckx is 111 ns. the clock generated in master mode must not violate this specification. 4: assumes 50 pf load on all spix pins. sckx (ckp = 0 ) sckx (ckp = 1 ) sdox sdix sp40 sp41 sp21 sp20 sp35 sp20 sp21 msb lsb bit 14 - - - - - -1 lsb in bit 14 - - - -1 sp30, sp31 sp30, sp31 note: refer to figure 33-1 for load conditions. sp36 sp10 msb in downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 463 dspic33epxxxgm3xx/6xx/7xx figure 33-19: spi2 and spi3 slav e mode (full-duplex, cke = 1 , ckp = 0 , smp = 0 ) timing characteristics ssx sckx (ckp = 0 ) sckx (ckp = 1 ) sdox sp60 sdix sp30, sp31 msb bit 14 - - - - - -1 lsb sp51 bit 14 - - - -1 lsb in sp35 sp52 sp73 sp72 sp72 sp73 sp40 sp41 note: refer to figure 33-1 for load conditions. sp36 sp50 msb in sp70 downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 464 ? 2013-2014 microchip technology inc. table 33-36: spi2 and spi3 sla ve mode (full-duplex, cke = 1 , ckp = 0 , smp = 0 ) timing requirements ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param. symbol characteristic ( 1 ) min. typ. ( 2 ) max. units conditions sp70 fscp maximum sckx input frequency 15 mhz (note 3 ) sp72 tscf sckx input fall time ns see parameter do32 (note 4 ) sp73 tscr sckx input rise time ns see parameter do31 (note 4 ) sp30 tdof sdox data output fall time ns see parameter do32 (note 4 ) sp31 tdor sdox data output rise time ns see parameter do31 (note 4 ) sp35 tsch2dov, tscl2dov sdox data output valid after sckx edge 6 20 ns sp36 tdov2sch, tdov2scl sdox data output setup to first sckx edge 30 ns sp40 tdiv2sch, tdiv2scl setup time of sdix data input to sckx edge 30 ns sp41 tsch2dil, ts c l 2 d i l hold time of sdix data input to sckx edge 30 ns sp50 tssl2sch, tssl2scl ssx ? to sckx ? or sckx ?? input 120 ns sp51 tssh2doz ssx ? to sdox output high-impedance 10 50 ns (note 4 ) sp52 tsch2ssh tscl2ssh ssx ?? after sckx edge 1.5 t cy + 40 ns (note 4 ) sp60 tssl2dov sdox data output valid after ssx edge 50 ns note 1: these parameters are characterized, but are not tested in manufacturing. 2: data in typical column is at 3.3v, +25c unless otherwise stated. 3: the minimum clock period for sckx is 66.7 ns. therefore, the sckx clock generated by the master must not violate this specification. 4: assumes 50 pf load on all spix pins. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 465 dspic33epxxxgm3xx/6xx/7xx figure 33-20: spi2 and spi3 slav e mode (full-duplex, cke = 1 , ckp = 1 , smp = 0 ) timing characteristics ssx sckx (ckp = 0 ) sckx (ckp = 1 ) sdox sdix sp60 sp30, sp31 msb bit 14 - - - - - -1 lsb sp51 bit 14 - - - -1 lsb in sp52 sp73 sp72 sp72 sp73 sp70 sp40 sp41 note: refer to figure 33-1 for load conditions. sp36 sp50 sp35 msb in downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 466 ? 2013-2014 microchip technology inc. table 33-37: spi2 and spi3 sla ve mode (full-duplex, cke = 1 , ckp = 1 , smp = 0 ) timing requirements ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param. symbol characteristic ( 1 ) min. typ. ( 2 ) max. units conditions sp70 fscp maximum sckx input frequency 11 mhz (note 3 ) sp72 tscf sckx input fall time ns see parameter do32 (note 4 ) sp73 tscr sckx input rise time ns see parameter do31 (note 4 ) sp30 tdof sdox data output fall time ns see parameter do32 (note 4 ) sp31 tdor sdox data output rise time ns see parameter do31 (note 4 ) sp35 tsch2dov, tscl2dov sdox data output valid after sckx edge 6 20 ns sp36 tdov2sch, tdov2scl sdox data output setup to first sckx edge 30 ns sp40 tdiv2sch, tdiv2scl setup time of sdix data input to sckx edge 30 ns sp41 tsch2dil, ts c l 2 d i l hold time of sdix data input to sckx edge 30 ns sp50 tssl2sch, tssl2scl ssx ? to sckx ? or sckx ?? input 120 ns sp51 tssh2doz ssx ? to sdox output high-impedance 10 50 ns (note 4 ) sp52 tsch2ssh tscl2ssh ssx ?? after sckx edge 1.5 t cy + 40 ns (note 4 ) sp60 tssl2dov sdox data output valid after ssx edge 50 ns note 1: these parameters are characterized, but are not tested in manufacturing. 2: data in typical column is at 3.3v, +25c unless otherwise stated. 3: the minimum clock period for sckx is 91 ns. therefore, the sckx clock generated by the master must not violate this specification. 4: assumes 50 pf load on all spix pins. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 467 dspic33epxxxgm3xx/6xx/7xx figure 33-21: spi2 and spi3 slav e mode (full-duplex, cke = 0 , ckp = 1 , smp = 0 ) timing characteristics ss x sck x (ckp = 0 ) sck x (ckp = 1 ) sdo x sp50 sp40 sp41 sp30, sp31 sp51 sp35 msb lsb bit 14 - - - - - -1 bit 14 - - - -1 lsb in sp52 sp73 sp72 sp72 sp73 note: refer to figure 33-1 for load conditions. sdi x msb in sp36 sp70 downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 468 ? 2013-2014 microchip technology inc. table 33-38: spi2 and spi3 sla ve mode (full-duplex, cke = 0 , ckp = 1 , smp = 0 ) timing requirements ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param. symbol characteristic ( 1 ) min. typ. ( 2 ) max. units conditions sp70 fscp maximum sckx input frequency 15 mhz (note 3 ) sp72 tscf sckx input fall time ns see parameter do32 (note 4 ) sp73 tscr sckx input rise time ns see parameter do31 (note 4 ) sp30 tdof sdox data output fall time ns see parameter do32 (note 4 ) sp31 tdor sdox data output rise time ns see parameter do31 (note 4 ) sp35 tsch2dov, tscl2dov sdox data output valid after sckx edge 6 20 ns sp36 tdov2sch, tdov2scl sdox data output setup to first sckx edge 30 ns sp40 tdiv2sch, tdiv2scl setup time of sdix data input to sckx edge 30 ns sp41 tsch2dil, ts c l 2 d i l hold time of sdix data input to sckx edge 30 ns sp50 tssl2sch, tssl2scl ssx ? to sckx ? or sckx ?? input 120 ns sp51 tssh2doz ssx ? to sdox output high-impedance 10 50 ns (note 4 ) sp52 tsch2ssh tscl2ssh ssx ?? after sckx edge 1.5 t cy + 40 ns (note 4 ) note 1: these parameters are characterized, but are not tested in manufacturing. 2: data in typical column is at 3.3v, +25c unless otherwise stated. 3: the minimum clock period for sckx is 66.7 ns. therefore, the sckx clock generated by the master must not violate this specification. 4: assumes 50 pf load on all spix pins. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 469 dspic33epxxxgm3xx/6xx/7xx figure 33-22: spi2 and spi3 slav e mode (full-duplex, cke = 0 , ckp = 0 , smp = 0 ) timing characteristics ss x sck x (ckp = 0 ) sck x (ckp = 1 ) sdo x sp50 sp40 sp41 sp30, sp31 sp51 sp35 msb lsb bit 14 - - - - - -1 bit 14 - - - -1 lsb in sp52 sp73 sp72 sp72 sp73 note: refer to figure 33-1 for load conditions. sdi x sp36 msb in sp70 downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 470 ? 2013-2014 microchip technology inc. table 33-39: spi2 and spi3 sla ve mode (full-duplex, cke = 0 , ckp = 0 , smp = 0 ) timing requirements ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param. symbol characteristic ( 1 ) min. typ. ( 2 ) max. units conditions sp70 fscp maximum sckx input frequency 11 mhz (note 3 ) sp72 tscf sckx input fall time ns see parameter do32 (note 4 ) sp73 tscr sckx input rise time ns see parameter do31 (note 4 ) sp30 tdof sdox data output fall time ns see parameter do32 (note 4 ) sp31 tdor sdox data output rise time ns see parameter do31 (note 4 ) sp35 tsch2dov, tscl2dov sdox data output valid after sckx edge 6 20 ns sp36 tdov2sch, tdov2scl sdox data output setup to first sckx edge 30 ns sp40 tdiv2sch, tdiv2scl setup time of sdix data input to sckx edge 30 ns sp41 tsch2dil, ts c l 2 d i l hold time of sdix data input to sckx edge 30 ns sp50 tssl2sch, tssl2scl ssx ? to sckx ? or sckx ?? input 120 ns sp51 tssh2doz ssx ? to sdox output high-impedance 10 50 ns (note 4 ) sp52 tsch2ssh tscl2ssh ssx ?? after sckx edge 1.5 t cy + 40 ns (note 4 ) note 1: these parameters are characterized, but are not tested in manufacturing. 2: data in typical column is at 3.3v, +25c unless otherwise stated. 3: the minimum clock period for sckx is 91 ns. therefore, the sckx clock generated by the master must not violate this specification. 4: assumes 50 pf load on all spix pins. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 471 dspic33epxxxgm3xx/6xx/7xx table 33-40: spi1 maximu m data/clock rate summary figure 33-23: spi1 master mode ( half-duplex, transmit only, cke = 0 ) timing characteristics ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended maximum data rate master transmit only (half-duplex) master transmit/receive (full-duplex) slave transmit/receive (full-duplex) cke ckp smp 25 mhz table 33-41 0 , 10 , 10 , 1 25 mhz table 33-42 10 , 11 25 mhz table 33-43 00 , 11 25 mhz table 33-44 100 25 mhz table 33-45 110 25 mhz table 33-46 010 25 mhz table 33-47 000 sck1 (ckp = 0 ) sck1 (ckp = 1 ) sdo1 sp10 sp21 sp20 sp35 sp20 sp21 msb lsb bit 14 - - - - - -1 sp30, sp31 sp30, sp31 note: refer to figure 33-1 for load conditions. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 472 ? 2013-2014 microchip technology inc. figure 33-24: spi1 master mode ( half-duplex, transmit only, cke = 1 ) timing characteristics table 33-41: spi1 master mode (half-duple x, transmit only) timing requirements ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param. symbol characteristic ( 1 ) min. typ. ( 2 ) max. units conditions sp10 fscp maximum sck1 frequency 25 mhz (note 3 ) sp20 tscf sck1 output fall time ns see parameter do32 (note 4 ) sp21 tscr sck1 output rise time ns see parameter do31 (note 4 ) sp30 tdof sdo1 data output fall time ns see parameter do32 (note 4 ) sp31 tdor sdo1 data output rise time ns see parameter do31 (note 4 ) sp35 tsch2dov, tscl2dov sdo1 data output valid after sck1 edge 62 0n s sp36 tdiv2sch, tdiv2scl sdo1 data output setup to first sck1 edge 20 ns note 1: these parameters are characterized, but are not tested in manufacturing. 2: data in typical column is at 3.3v, +25c unless otherwise stated. 3: the minimum clock period for sck1 is 66.7 ns. therefore, the clock generated in master mode must not violate this specification. 4: assumes 50 pf load on all spi1 pins. sck1 (ckp = 0 ) sck1 (ckp = 1 ) sdo1 sp21 sp20 sp35 sp20 sp21 msb lsb bit 14 - - - - - -1 sp30, sp31 note: refer to figure 33-1 for load conditions. sp36 sp10 downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 473 dspic33epxxxgm3xx/6xx/7xx figure 33-25: spi1 master mode (full-duplex, cke = 1 , ckp = x , smp = 1 ) timing characteristics table 33-42: spi1 master mode (full-duplex, cke = 1 , ckp = x , smp = 1 ) timing requirements ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param. symbol characteristic ( 1 ) min. typ. ( 2 ) max. units conditions sp10 fscp maximum sck1 frequency 25 mhz (note 3 ) sp20 tscf sck1 output fall time ns see parameter do32 (note 4 ) sp21 tscr sck1 output rise time ns see parameter do31 (note 4 ) sp30 tdof sdo1 data output fall time ns see parameter do32 (note 4 ) sp31 tdor sdo1 data output rise time ns see parameter do31 (note 4 ) sp35 tsch2dov, tscl2dov sdo1 data output valid after sck1 edge 62 0n s sp36 tdov2sc, tdov2scl sdo1 data output setup to first sck1 edge 2 0 n s sp40 tdiv2sch, tdiv2scl setup time of sdi1 data input to sck1 edge 2 0 n s sp41 tsch2dil, ts c l 2 d i l hold time of sdi1 data input to sck1 edge 1 5 n s note 1: these parameters are characterized, but are not tested in manufacturing. 2: data in typical column is at 3.3v, +25c unless otherwise stated. 3: the minimum clock period for sck1 is 100 ns. the clock generated in master mode must not violate this specification. 4: assumes 50 pf load on all spi1 pins. sck1 (ckp = 0 ) sck1 (ckp = 1 ) sdo1 sp21 sp20 sp35 sp20 sp21 msb lsb bit 14 - - - - - -1 sp30, sp31 note: refer to figure 33-1 for load conditions. sp36 sp41 lsb in bit 14 - - - -1 sdi1 sp40 msb in sp10 downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 474 ? 2013-2014 microchip technology inc. figure 33-26: spi1 master mode (full-duplex, cke = 0 , ckp = x , smp = 1 ) timing characteristics table 33-43: spi1 master mode (full-duplex, cke = 0 , ckp = x , smp = 1 ) timing requirements ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param. symbol characteristic ( 1 ) min. typ. ( 2 ) max. units conditions sp10 fscp maximum sck1 frequency 25 mhz -40oc to +125oc (note 3 ) sp20 tscf sck1 output fall time ns see parameter do32 (note 4 ) sp21 tscr sck1 output rise time ns see parameter do31 (note 4 ) sp30 tdof sdo1 data output fall time ns see parameter do32 (note 4 ) sp31 tdor sdo1 data output rise time ns see parameter do31 (note 4 ) sp35 tsch2dov, tscl2dov sdo1 data output valid after sck1 edge 62 0n s sp36 tdov2sch, tdov2scl sdo1 data output setup to first sck1 edge 2 0 n s sp40 tdiv2sch, tdiv2scl setup time of sdi1 data input to sck1 edge 2 0 n s sp41 tsch2dil, ts c l 2 d i l hold time of sdi1 data input to sck1 edge 2 0 n s note 1: these parameters are characterized, but are not tested in manufacturing. 2: data in typical column is at 3.3v, +25c unless otherwise stated. 3: the minimum clock period for sck1 is 100 ns. the clock generated in master mode must not violate this specification. 4: assumes 50 pf load on all spi1 pins. sck1 (ckp = 0 ) sck1 (ckp = 1 ) sdo1 sd1 sp40 sp41 sp21 sp20 sp35 sp20 sp21 msb lsb bit 14 - - - - - -1 lsb in bit 14 - - - -1 sp30, sp31 sp30, sp31 note: refer to figure 33-1 for load conditions. sp36 msb in sp10 downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 475 dspic33epxxxgm3xx/6xx/7xx figure 33-27: spi1 slave mo de (full-duplex, cke = 1 , ckp = 0 , smp = 0 ) timing characteristics ss1 sck1 (ckp = 0 ) sck1 (ckp = 1 ) sdo1 sp60 sdi1 sp30, sp31 msb bit 14 - - - - - -1 lsb sp51 bit 14 - - - -1 lsb in sp52 sp73 sp72 sp72 sp73 sp40 sp41 note: refer to figure 33-1 for load conditions. sp36 sp35 msb in sp70 sp50 downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 476 ? 2013-2014 microchip technology inc. table 33-44: spi1 slave mo de (full-duplex, cke = 1 , ckp = 0 , smp = 0 ) timing requirements ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param. symbol characteristic ( 1 ) min. typ. ( 2 ) max. units conditions sp70 fscp maximum sck1 input frequency 25 mhz (note 3 ) sp72 tscf sck1 input fall time ns see parameter do32 (note 4 ) sp73 tscr sck1 input rise time ns see parameter do31 (note 4 ) sp30 tdof sdo1 data output fall time ns see parameter do32 (note 4 ) sp31 tdor sdo1 data output rise time ns see parameter do31 (note 4 ) sp35 tsch2dov, tscl2dov sdo1 data output valid after sck1 edge 6 20 ns sp36 tdov2sch, tdov2scl sdo1 data output setup to first sck1 edge 20 ns sp40 tdiv2sch, tdiv2scl setup time of sdix data input to sck1 edge 20 ns sp41 tsch2dil, ts c l 2 d i l hold time of sdi1 data input to sck1 edge 15 ns sp50 tssl2sch, tssl2scl ss1 ? to sck1 ? or sck1 ?? input 120 ns sp51 tssh2doz ss1 ? to sdo1 output high-impedance 10 50 ns (note 4 ) sp52 tsch2ssh tscl2ssh ss1 ?? after sck1 edge 1.5 t cy + 40 ns (note 4 ) sp60 tssl2dov sdo1 data output valid after ss1 edge 50 ns note 1: these parameters are characterized, but are not tested in manufacturing. 2: data in typical column is at 3.3v, +25c unless otherwise stated. 3: the minimum clock period for sck1 is 66.7 ns. therefore, the sck1 clock generated by the master must not violate this specification. 4: assumes 50 pf load on all spi1 pins. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 477 dspic33epxxxgm3xx/6xx/7xx figure 33-28: spi1 slave mo de (full-duplex, cke = 1 , ckp = 1 , smp = 0 ) timing characteristics ss1 sck1 (ckp = 0 ) sck1 (ckp = 1 ) sdo1 sp60 sdi1 sp30, sp31 msb bit 14 - - - - - -1 lsb sp51 bit 14 - - - -1 lsb in sp52 sp73 sp72 sp72 sp73 sp70 sp40 sp41 note: refer to figure 33-1 for load conditions. sp36 sp50 msb in sp35 downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 478 ? 2013-2014 microchip technology inc. table 33-45: spi1 slave mo de (full-duplex, cke = 1 , ckp = 1 , smp = 0 ) timing requirements ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param. symbol characteristic ( 1 ) min. typ. ( 2 ) max. units conditions sp70 fscp maximum sck1 input frequency 25 mhz (note 3 ) sp72 tscf sck1 input fall time ns see parameter do32 (note 4 ) sp73 tscr sck1 input rise time ns see parameter do31 (note 4 ) sp30 tdof sdo1 data output fall time ns see parameter do32 (note 4 ) sp31 tdor sdo1 data output rise time ns see parameter do31 (note 4 ) sp35 tsch2dov, tscl2dov sdo1 data output valid after sck1 edge 6 20 ns sp36 tdov2sch, tdov2scl sdo1 data output setup to first sck1 edge 20 ns sp40 tdiv2sch, tdiv2scl setup time of sdi1 data input to sck1 edge 20 ns sp41 tsch2dil, ts c l 2 d i l hold time of sdi1 data input to sck1 edge 15 ns sp50 tssl2sch, tssl2scl ss1 ? to sck1 ? or sck1 ?? input 120 ns sp51 tssh2doz ss1 ? to sdo1 output high-impedance 10 50 ns (note 4 ) sp52 tsch2ssh, tscl2ssh ss1 ?? after sck1 edge 1.5 t cy + 40 ns (note 4 ) sp60 tssl2dov sdo1 data output valid after ss1 edge 50 ns note 1: these parameters are characterized, but are not tested in manufacturing. 2: data in typical column is at 3.3v, +25c unless otherwise stated. 3: the minimum clock period for sck1 is 91 ns. therefore, the sck1 clock generated by the master must not violate this specification. 4: assumes 50 pf load on all spi1 pins. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 479 dspic33epxxxgm3xx/6xx/7xx figure 33-29: spi1 slave mo de (full-duplex, cke = 0 , ckp = 1 , smp = 0 ) timing characteristics ss 1 sck1 (ckp = 0 ) sck1 (ckp = 1 ) sdo1 sp50 sp40 sp41 sp30, sp31 sp51 sp35 msb lsb bit 14 - - - - - -1 bit 14 - - - -1 lsb in sp52 sp73 sp72 sp72 sp73 note: refer to figure 33-1 for load conditions. sdi1 sp36 msb in sp70 downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 480 ? 2013-2014 microchip technology inc. table 33-46: spi1 slave mo de (full-duplex, cke = 0 , ckp = 1 , smp = 0 ) timing requirements ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param. symbol characteristic ( 1 ) min. typ. ( 2 ) max. units conditions sp70 fscp maximum sck1 input frequency 25 mhz (note 3 ) sp72 tscf sck1 input fall time ns see parameter do32 (note 4 ) sp73 tscr sck1 input rise time ns see parameter do31 (note 4 ) sp30 tdof sdo1 data output fall time ns see parameter do32 (note 4 ) sp31 tdor sdo1 data output rise time ns see parameter do31 (note 4 ) sp35 tsch2dov, tscl2dov sdo1 data output valid after sck1 edge 6 20 ns sp36 tdov2sch, tdov2scl sdo1 data output setup to first sck1 edge 20 ns sp40 tdiv2sch, tdiv2scl setup time of sdi1 data input to sck1 edge 20 ns sp41 tsch2dil, ts c l 2 d i l hold time of sdi1 data input to sck1 edge 15 ns sp50 tssl2sch, tssl2scl ss1 ? to sck1 ? or sck1 ?? input 120 ns sp51 tssh2doz ss1 ? to sdo1 output high-impedance 10 50 ns (note 4 ) sp52 tsch2ssh, tscl2ssh ss1 ?? after sck1 edge 1.5 t cy + 40 ns (note 4 ) note 1: these parameters are characterized, but are not tested in manufacturing. 2: data in typical column is at 3.3v, +25c unless otherwise stated. 3: the minimum clock period for sck1 is 66.7 ns. therefore, the sck1 clock generated by the master must not violate this specification. 4: assumes 50 pf load on all spi1 pins. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 481 dspic33epxxxgm3xx/6xx/7xx figure 33-30: spi1 slave mo de (full-duplex, cke = 0 , ckp = 0 , smp = 0 ) timing characteristics ss 1 sck1 (ckp = 0 ) sck1 (ckp = 1 ) sdo1 sp50 sp40 sp41 sp30, sp31 sp51 sp35 msb lsb bit 14 - - - - - -1 bit 14 - - - -1 lsb in sp52 sp73 sp72 sp72 sp73 note: refer to figure 33-1 for load conditions. sdi1 msb in sp36 sp70 downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 482 ? 2013-2014 microchip technology inc. table 33-47: spi1 slave mo de (full-duplex, cke = 0 , ckp = 0 , smp = 0 ) timing requirements ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param. symbol characteristic ( 1 ) min. typ. ( 2 ) max. units conditions sp70 fscp maximum sck1 input frequency 25 mhz (note 3 ) sp72 tscf sck1 input fall time ns see parameter do32 (note 4 ) sp73 tscr sck1 input rise time ns see parameter do31 (note 4 ) sp30 tdof sdo1 data output fall time ns see parameter do32 (note 4 ) sp31 tdor sdo1 data output rise time ns see parameter do31 (note 4 ) sp35 tsch2dov, tscl2dov sdo1 data output valid after sck1 edge 6 20 ns sp36 tdov2sch, tdov2scl sdo1 data output setup to first sck1 edge 20 ns sp40 tdiv2sch, tdiv2scl setup time of sdi1 data input to sck1 edge 20 ns sp41 tsch2dil, ts c l 2 d i l hold time of sdi1 data input to sck1 edge 15 ns sp50 tssl2sch, tssl2scl ss1 ? to sck1 ? or sck1 ?? input 120 ns sp51 tssh2doz ss1 ? to sdo1 output high-impedance 10 50 ns (note 4 ) sp52 tsch2ssh, tscl2ssh ss1 ?? after sck1 edge 1.5 t cy + 40 ns (note 4 ) note 1: these parameters are characterized, but are not tested in manufacturing. 2: data in typical column is at 3.3v, +25c unless otherwise stated. 3: the minimum clock period for sck1 is 91 ns. therefore, the sck1 clock generated by the master must not violate this specification. 4: assumes 50 pf load on all spi1 pins. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 483 dspic33epxxxgm3xx/6xx/7xx figure 33-31: i2cx bus start/stop bits timing characteristics (master mode) figure 33-32: i2cx bus data timing characteristics (master mode) sclx sdax start condition stop condition note: refer to figure 33-1 for load conditions. im31 im30 im34 im33 im11 im10 im33 im11 im10 im20 im26 im25 im40 im40 im45 im21 sclx sdax in sdax out note: refer to figure 33-1 for load conditions. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 484 ? 2013-2014 microchip technology inc. table 33-48: i2cx bus data timing requirements (master mode) ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristic ( 4 ) min. ( 1 ) max. units conditions im10 t lo : scl clock low time 100 khz mode t cy /2 (brg + 2) ? s 400 khz mode t cy /2 (brg + 2) ? s 1 mhz mode ( 2 ) t cy /2 (brg + 2) ? s im11 t hi : scl clock high time 100 khz mode t cy /2 (brg + 2) ? s 400 khz mode t cy /2 (brg + 2) ? s 1 mhz mode ( 2 ) t cy /2 (brg + 2) ? s im20 t f : scl sdax and sclx fall time 100 khz mode 300 ns c b is specified to be from 10 to 400 pf 400 khz mode 20 + 0.1 c b 300 ns 1 mhz mode ( 2 ) 100 ns im21 t r : scl sdax and sclx rise time 100 khz mode 1000 ns c b is specified to be from 10 to 400 pf 400 khz mode 20 + 0.1 c b 300 ns 1 mhz mode ( 2 ) 300 ns im25 t su : dat data input setup time 100 khz mode 250 ns 400 khz mode 100 ns 1 mhz mode ( 2 ) 40 ns im26 t hd : dat data input hold time 100 khz mode 0 ? s 400 khz mode 0 0.9 ? s 1 mhz mode ( 2 ) 0.2 ? s im30 t su : sta start condition setup time 100 khz mode t cy /2 (brg + 2) ? s only relevant for repeated start condition 400 khz mode t cy /2 (brg + 2) ? s 1 mhz mode ( 2 ) t cy /2 (brg + 2) ? s im31 t hd : sta start condition hold time 100 khz mode t cy /2 (brg + 2) ? s after this period, the first clock pulse is generated 400 khz mode t cy /2 (brg +2) ? s 1 mhz mode ( 2 ) t cy /2 (brg + 2) ? s im33 t su : sto stop condition setup time 100 khz mode t cy /2 (brg + 2) ? s 400 khz mode t cy /2 (brg + 2) ? s 1 mhz mode ( 2 ) t cy /2 (brg + 2) ? s im34 t hd : sto stop condition hold time 100 khz mode t cy /2 (brg + 2) ? s 400 khz mode t cy /2 (brg + 2) ? s 1 mhz mode ( 2 ) t cy /2 (brg + 2) ? s im40 t aa : scl output valid from clock 100 khz mode 3500 ns 400 khz mode 1000 ns 1 mhz mode ( 2 ) 400 ns im45 t bf : sda bus free time 100 khz mode 4.7 ? s time the bus must be free before a new transmission can start 400 khz mode 1.3 ? s 1 mhz mode ( 2 ) 0.5 ? s im50 c b bus capacitive loading 400 pf im51 t pgd pulse gobbler delay 65 390 ns (note 3 ) note 1: brg is the value of the i 2 c baud rate generator. refer to the dspic33/pic24 family reference manual?, inter-integrated circuit? (i 2 c?) (ds70000195). please see the microchip web site for the latest dspic33e/pic24e family reference manual? sections. 2: maximum pin capacitance = 10 pf for all i2cx pins (for 1 mhz mode only). 3: typical value for this parameter is 130 ns. 4: these parameters are characterized, but not tested in manufacturing. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 485 dspic33epxxxgm3xx/6xx/7xx figure 33-33: i2cx bus start/stop bits timing characteristics (slave mode) figure 33-34: i2cx bus data timi ng characteristics (slave mode) sclxsdax start condition stop condition is31 is30 is34 is33 is30 is31 is33 is11 is10 is20 is25 is40 is40 is45 is21 sclx sdax in sdax out is26 downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 486 ? 2013-2014 microchip technology inc. table 33-49: i2cx bus data timing requirements (slave mode) ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param. no. symbol characteristic ( 3 ) min. max. units conditions is10 t lo : scl clock low time 100 khz mode 4.7 ? s 400 khz mode 1.3 ? s 1 mhz mode ( 1 ) 0.5 ? s is11 t hi : scl clock high time 100 khz mode 4.0 ? s device must operate at a minimum of 1.5 mhz 400 khz mode 0.6 ? s device must operate at a minimum of 10 mhz 1 mhz mode ( 1 ) 0.5 ? s is20 t f : scl sdax and sclx fall time 100 khz mode 300 ns c b is specified to be from 10 to 400 pf 400 khz mode 20 + 0.1 c b 300 ns 1 mhz mode ( 1 ) 1 0 0n s is21 t r : scl sdax and sclx rise time 100 khz mode 1000 ns c b is specified to be from 10 to 400 pf 400 khz mode 20 + 0.1 c b 300 ns 1 mhz mode ( 1 ) 3 0 0n s is25 t su : dat data input setup time 100 khz mode 250 ns 400 khz mode 100 ns 1 mhz mode ( 1 ) 100 ns is26 t hd : dat data input hold time 100 khz mode 0 ? s 400 khz mode 0 0.9 ? s 1 mhz mode ( 1 ) 00 . 3 ? s is30 t su : sta start condition setup time 100 khz mode 4.7 ? s only relevant for repeated start condition 400 khz mode 0.6 ? s 1 mhz mode ( 1 ) 0.25 ? s is31 t hd : sta start condition hold time 100 khz mode 4.0 ? s after this period, the first clock pulse is generated 400 khz mode 0.6 ? s 1 mhz mode ( 1 ) 0.25 ? s is33 t su : sto stop condition setup time 100 khz mode 4.7 ? s 400 khz mode 0.6 ? s 1 mhz mode ( 1 ) 0.6 ? s is34 t hd : sto stop condition hold time 100 khz mode 4 ? s 400 khz mode 0.6 ? s 1 mhz mode ( 1 ) 0.25 ? s is40 t aa : scl output valid from clock 100 khz mode 0 3500 ns 400 khz mode 0 1000 ns 1 mhz mode ( 1 ) 03 5 0n s is45 t bf : sda bus free time 100 khz mode 4.7 ? s time the bus must be free before a new transmission can start 400 khz mode 1.3 ? s 1 mhz mode ( 1 ) 0.5 ? s is50 c b bus capacitive loading 400 pf is51 t pgd pulse gobbler delay 65 390 ns (note 2 ) note 1: maximum pin capacitance = 10 pf for all i2cx pins (for 1 mhz mode only). 2: the typical value for this parameter is 130 ns. 3: these parameters are characterized, but not tested in manufacturing. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 487 dspic33epxxxgm3xx/6xx/7xx figure 33-35: canx module i/o timing characteristics table 33-50: canx module i/o timing requirements figure 33-36: uart x module i/o timing characteristics table 33-51: uartx module i/o timing requirements ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristic ( 1 ) min. typ. ( 2 ) max. units conditions ca10 t io f port output fall time ns see parameter do32 ca11 t io r port output rise time ns see parameter do31 ca20 t cwf pulse width to trigger can wake-up filter 120 ns note 1: these parameters are characterized but not tested in manufacturing. 2: data in typical column is at 3.3v, +25c unless otherwise stated. parameters are for design guidance only and are not tested. ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +125c param no. symbol characteristic ( 1 ) min. typ. ( 2 ) max. units conditions ua10 t uabaud uartx baud time 66.67 ns ua11 f baud uartx baud frequency 15 mbps ua20 t cwf start bit pulse width to trigger uartx wake-up 500 ns note 1: these parameters are characterized but not tested in manufacturing. 2: data in typical column is at 3.3v, +25c unless otherwise stated. parameters are for design guidance only and are not tested. cxtx pin (output) ca10 ca11 old value new value ca20 cxrx pin (input) ua20 uxrx msb in lsb in bit 6-1 ua10 u x tx downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 488 ? 2013-2014 microchip technology inc. table 33-52: op amp/co mparator specifications dc characteristics standard operating conditions (see note 3 ): 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristic min. typ. ( 1 ) max. units conditions comparator ac characteristics cm10 t resp response time 19 ns v+ input step of 100 mv, v- input held at v dd /2 cm11 t mc 2 ov comparator mode change to output valid 1 0 s comparator dc characteristics cm30 v offset comparator offset voltage 2 0 7 5m v cm31 v hyst input hysteresis voltage 30 mv cm32 t rise / t fall comparator output rise/fall time 20 ns 1 pf load capacitance on input cm33 v gain open-loop voltage gain 90 db cm34 v icm input common-mode voltage av ss a v dd v op amp ac characteristics cm20 s r slew rate 9 v/s 10 pf load cm21a p m phase margin 68 degree g = 100v/v; 10 pf load cm22 g m gain margin 20 db g = 100v/v; 10 pf load cm23a g bw gain bandwidth 10 mhz 10 pf load op amp dc characteristics cm40 v cmr common-mode input voltage range av ss a v dd v cm41 c mrr common-mode rejection ratio 4 0 d b v cm = av dd /2 cm42 v offset op amp offset voltage 20 70 mv cm43 v gain open-loop voltage gain 90 db cm44 i os input offset current see pad leakage currents in table 33-10 cm45 i b input bias current see pad leakage currents in table 33-10 cm46 i out output current 420 a with minimum value of r feedback (cm48) cm48 r feedback feedback resistance value 8k ? (note 2 ) cm49a v out output voltage av ss + 0.075 av dd C 0.075 vi out = 420 a note 1: data in typ column is at 3.3v, +25c unless otherwise stated. 2: resistances can vary by 10% between op amps. 3: device is functional at v bormin < v dd < v ddmin , but will have degraded performance. device functionality is tested, but not characterized. analog modules: adc, op amp/comparator and comparator voltage reference, will have degraded performance. refer to parameter bo10 in table 33-12 for the minimum and maximum bor values. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 489 dspic33epxxxgm3xx/6xx/7xx table 33-54: op amp/comparator vo ltage reference specifications table 33-53: op amp/comparator voltage re ference settling time specifications ac characteristics standard operating conditions (see note 2 ): 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param. symbol characteristic min. typ. max. units conditions vr310 t set settling time 1 10 ? s (note 1 ) note 1: settling time is measured while cvrr = 1 and the cvr<3:0> bits transition from 0000 to 1111 . 2: device is functional at v bormin < v dd < v ddmin , but will have degraded performance. device functionality is tested, but not characterized. analog modules: adc, op amp/comparator and comparator voltage reference, will have degraded performance. refer to parameter bo10 in table 33-12 for the minimum and maximum bor values. dc characteristics standard operating conditions (see note 1 ): 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristics min. typ. max. units conditions vrd310 cv res resolution cv rsrc /24 cv rsrc /32 lsb vrd311 cvr aa absolute accuracy of internal dac input to comparators 2 5m v a v dd = cv rsrc = 3.3v vrd312 cvr aa 1 absolute accuracy of c vref x o pins + 7 5 / - 2 5m v a v dd = cv rsrc = 3.3v vrd313 cv rsrc input reference voltage 0 av dd + 0.3 v vrd314 cvr out buffer output resistance 1.5k ? vrd315 cv cl permissible capacitive load (c vref x o pins) 2 5p f vrd316 i ocvr permissible current output (c vref x o pins) 1m a vrd317 i on current consumed when module is enabled 5 0 0 a a v dd = 3.6v vrd318 i off current consumed when module is disabled 1n a a v dd = 3.6v note 1: device is functional at v bormin < v dd < v ddmin , but will have degraded performance. device functionality is tested, but not characterized. analog modules: adc, op amp/comparator and comparator voltage reference, will have degraded performance. refer to parameter bo10 in table 33-12 for the minimum and maximum bor values. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 490 ? 2013-2014 microchip technology inc. figure 33-37: load conditions for device timing specifications table 33-55: ctmu current source specifications dc characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristic ( 1 ) min. typ. max. units conditions ctmu current source ctmui1 i out 1 base range 280 550 830 na ctmuicon<9:8> = 01 ctmui2 i out 2 10x range 2.8 5.5 8.3 a ctmuicon<9:8> = 10 ctmui3 i out 3 100x range 28 55 83 a ctmuicon<9:8> = 11 ctmui4 i out 4 1000x range 280 550 830 a ctmuicon<9:8> = 00 ctmufv1 v f 0 . 7 7 v ctmufv2 v fvr -1.38 mv/c note 1: nominal value at center point of current trim range (ctmuicon<15:10> = 000000 ). v dd /2 c l r l pin pin v ss v ss c l r l =464 ? c l = 50 pf for all pins except osc2 15 pf for osc2 output load condition 1 C for all pins except osc2 load condition 2 C for osc2 downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 491 dspic33epxxxgm3xx/6xx/7xx table 33-56: adcx module specifications ac characteristics standard operating conditions (see note 1 ): 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristic min. typ. max. units conditions device supply ad01 av dd module v dd supply greater of: v dd C 0.3 or 3.0 lesser of: v dd + 0.3 or 3.6 v ad02 av ss module v ss supply v ss C 0.3 v ss + 0.3 v reference inputs ad05 v refh reference voltage high av ss + 2.7 av dd v (note 1 ) v refh = v ref +, v refl = v ref - ad05a 3.0 3.6 v v refh = av dd , v refl = av ss = 0 ad06 v refl reference voltage low av ss av dd C 2.7 v (note 1 ) ad06a 0 0 v v refh = av dd , v refl = av ss = 0 ad07 v ref absolute reference voltage 2.7 3.6 v v ref = v refh C v refl ad08 i ref current drain 10 600 ? a ? a adc off adc on ad09 i ad operating current 52 mama adc operating in 10-bit mode (note 1 ) adc operating in 12-bit mode (note 1 ) analog input ad12 v inh input voltage range, v inh v inl v refh v this voltage reflects sample-and-hold channels 0, 1, 2 and 3 (ch0-ch3), positive input ad13 v inl input voltage range, v inl v refl av ss + 1v v this voltage reflects sample-and-hold channels 0, 1, 2 and 3 (ch0-ch3), negative input ad17 r in recommended impedance of analog voltage source 2 0 0 ? impedance to achieve maximum performance of adc note 1: device is functional at v bormin < v dd < v ddmin , but will have degraded performance. device functionality is tested, but not characterized. analog modules: adc, op amp/comparator and comparator voltage reference, will have degraded performance. refer to parameter bo10 in table 33-12 for the minimum and maximum bor values. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 492 ? 2013-2014 microchip technology inc. table 33-57: adcx module spec ifications (12-bit mode) ac characteristics standard operating conditions (see note 1 ): 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristic min. typ. max. units conditions adc accuracy (12-bit mode) C v ref - ad20a nr resolution 12 data bits bits ad21a inl integral nonlinearity -3 +3 lsb v inl = av ss = v refl = 0v, av dd = v refh = 3.6v (note 2 ) ad22a dnl differential nonlinearity ?? 1< 1l s bv inl = av ss = v refl = 0v, av dd = v refh = 3.6v (note 2 ) ad23a g err gain error -10 10 lsb v inl = av ss = v refl = 0v, av dd = v refh = 3.6v (note 2 ) ad24a e off offset error -5 5 lsb v inl = av ss = v refl = 0v, av dd = v refh = 3.6v (note 2 ) ad25a monotonicity guaranteed dynamic performance (12-bit mode) ad30a thd total harmonic distortion -75 db ad31a sinad signal to noise and distortion 68.5 69.5 db ad32a sfdr spurious free dynamic range 80 db ad33a f nyq input signal bandwidth 250 khz ad34a enob effective number of bits 11.09 11.3 bits note 1: device is functional at v bormin < v dd < v ddmin , but will have degraded performance. device functionality is tested, but not characterized. analog modules: adc, op amp/comparator and comparator voltage reference, will have degraded performance. refer to parameter bo10 in table 33-12 for the minimum and maximum bor values. 2: for all accuracy specifications, v inl = av ss = v refl = 0v and av dd = v refh = 3.6v. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 493 dspic33epxxxgm3xx/6xx/7xx table 33-58: adcx module spec ifications (10-bit mode) ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) ( 1 ) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristic min. typ. max. units conditions adc accuracy (10-bit mode) ad20b nr resolution 10 data bits bits ad21b inl integral nonlinearity -0.625 0.625 lsb -40c ? t a ? +85c (note 2 ) -1.5 1.5 lsb +85c ? t a ? +125c (note 2 ) ad22b dnl differential nonlinearity -0.25 0.25 lsb -40c ? t a ? +85c (note 2 ) -0.25 0.25 lsb +85c ? t a ? +125c (note 2 ) ad23b g err gain error -2.5 2.5 lsb -40c ? t a ? +85c (note 2 ) -2.5 2.5 lsb +85c ? t a ? +125c (note 2 ) ad24b e off offset error -1.25 1.25 lsb -40c ? t a ? +85c (note 2 ) -1.25 1.25 lsb +85c ? t a ? +125c (note 2 ) ad25b monotonicity guaranteed dynamic performance (10-bit mode) ad30b thd total harmonic distortion ( 3 ) 6 4d b ad31b sinad signal to noise and distortion ( 3 ) 5 7d b ad32b sfdr spurious free dynamic range ( 3 ) 7 2d b ad33b f nyq input signal bandwidth ( 3 ) 5 5 0k h z ad34b enob effective number of bits ( 3 ) 9 . 4b i t s note 1: device is functional at v bormin < v dd < v ddmin , but will have degraded performance. device functionality is tested, but not characterized. analog modules: adc, op amp/comparator and comparator voltage reference, may have degraded performance. refer to parameter bo10 in table 33-12 for the minimum and maximum bor values. 2: for all accuracy specifications, v inl = av ss = v refl = 0v and av dd = v refh = 3.6v. 3: parameters are characterized but not tested in manufacturing. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 494 ? 2013-2014 microchip technology inc. figure 33-38: adc1 conversion (12- bit mode) timing characteristics (asam = 0 , ssrc<2:0> = 000 , ssrcg = 0 ) ad55 t samp set samp ad61 adclk instruction samp ad60 done ad1if 1 2 3 4 5 6 8 7 1 C software sets ad1con1. samp to start sampling. 2 C sampling starts after discharge period. t samp is described in 3 C software clears ad1con1. samp to start conversion. 4 C sampling ends, conversion sequence starts. 5 C convert bit 11. 9 C one t ad for end of conversion. ad50 9 6 C convert bit 10. 7 C convert bit 1. 8 C convert bit 0. execution ?dspic33/pic24 family reference manual? . analog-to-digital converter (adc) (ds70621) of the clear samp downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 495 dspic33epxxxgm3xx/6xx/7xx table 33-59: adcx conversion (12- bit mode) timing requirements ac characteristics standard operating conditions (see note 2 ): 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristic min. typ. ( 4 ) max. units conditions clock parameters ad50 t ad adcx clock period 117.6 ns ad51 t rc adcx internal rc oscillator period 250 ns conversion rate ad55 t conv conversion time 14 t ad ns ad56 f cnv throughput rate 500 ksps ad57a t samp sample time when sampling any anx input 3 t ad ad57b t samp sample time when sampling the op amp outputs 3 t ad timing parameters ad60 t pcs conversion start from sample trigger ( 1 ) 2 t ad 3 t ad auto-convert trigger is not selected ad61 t pss sample start from setting sample (samp) bit ( 1 ) 2 t ad 3 t ad ad62 t css conversion completion to sample start (asam = 1 ) ( 1 ) 0.5 t ad ad63 t dpu time to stabilize analog stage from adcx off to adcx on ( 1 ) 2 0 ? s (note 3 ) note 1: because the sample caps will eventually lose charge, clock rates below 10 khz may affect lineari ty performance, especially at elevated temperatures. 2: device is functional at v bormin < v dd < v ddmin , but will have degraded performance. device functionality is tested, but not characterized. analog modules: adc, op amp/comparator and comparator voltage reference, will have degraded performance. refer to parameter bo10 in table 33-12 for the minimum and maximum bor values. 3: the parameter, t dpu , is the time required for the adcx module to stabilize at the appropriate level when the module is turned on (adon (ad1con1<15>) = 1 ). during this time, the adcx result is indeterminate. 4: these parameters are characterized, but not tested in manufacturing. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 496 ? 2013-2014 microchip technology inc. figure 33-39: adc1 conversion (10-bit mode) timing characteristics (chps<1:0> = 01 , simsam = 0 , asam = 0 , ssrc<2:0> = 000 , ssrcg = 0 ) figure 33-40: adc1 conversion (10-bit mode) timing characteristics (chp s<1:0> = 01 , simsam = 0 , asam = 1 , ssrc<2:0> = 111 , ssrcg = 0 , samc<4:0> = 00010 ) t samp set samp ad61 adclk instruction samp ad60 done ad1if 1 2 3 4 5 6 8 5 6 7 1 C software sets ad1con1. samp to start sampling. 2 C sampling starts after discharge period. t samp is described in 3 C software clears ad1con1. samp to start conversion. 4 C sampling ends, conversion sequence starts. 5 C convert bit 9. 8 C one t ad for end of conversion. ad50 7 8 6 C convert bit 8. 7 C convert bit 0. execution ?dspic33/pic24 family reference manual? . analog-to-digital converter (adc) (ds70621) of the ad55 ad55 clear samp 1 2 3 4 5 6 4 5 6 8 1 C software sets ad1con1. adon to start adc operation. 2 C sampling starts after discharge period. t samp is described in 3 C convert bit 9. 4 C convert bit 8. 5 C convert bit 0. 7 3 6 C one t ad for end of conversion. 7 C begin conversion of next channel. 8 C sample for time specified by samc<4:0>. adclk instruction set adon execution samp t samp ad1if done ad55 ad55 t samp ad55 ad50 analog-to-digital converter (adc) (ds70621) of the ?dspic33/pic24 family reference manual? . ad62 downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 497 dspic33epxxxgm3xx/6xx/7xx table 33-60: adcx conversion (10- bit mode) timing requirements ac characteristics standard operating conditions (see note 1 ): 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristic min. typ. ( 4 ) max. units conditions clock parameters ad50 t ad adcx clock period 75 ns ad51 t rc adcx internal rc oscillator period 250 ns conversion rate ad55 t conv conversion time 12 t ad ad56 f cnv throughput rate 1.1 msps using simultaneous sampling ad57a t samp sample time when sampling any anx input 2 t ad ad57b t samp sample time when sampling the op amp outputs 4 t ad timing parameters ad60 t pcs conversion start from sample trigger ( 2 ) 2 t ad 3 t ad auto-convert trigger not selected ad61 t pss sample start from setting sample (samp) bit ( 2 ) 2 t ad 3 t ad ad62 t css conversion completion to sample start (asam = 1 ) ( 2 ) 0 . 5 t ad ad63 t dpu time to stabilize analog stage from adc off to adc on ( 2 ) 2 0 ? s (note 3 ) note 1: device is functional at v bormin < v dd < v ddmin , but will have degraded performance. device functionality is tested, but not characterized. analog modules: adc, op amp/comparator and comparator voltage reference, will have degraded performance. refer to parameter bo10 in table 33-12 for the minimum and maximum bor values. 2: because the sample caps will eventually lose charge, clock rates below 10 khz may affect lineari ty performance, especially at elevated temperatures. 3: the parameter, t dpu , is the time required for the adcx module to stabilize at the appropriate level when the module is turned on (ad1con1 = 1 ). during this time, the adcx result is indeterminate. 4: these parameters are characterized, but not tested in manufacturing. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 498 ? 2013-2014 microchip technology inc. table 33-61: dma module timing requirements ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. characteristic min. typ. ( 1 ) max. units conditions dm1 dma byte/word transfer latency 1 t cy ( 2 ) n s note 1: these parameters are characterized, but not tested in manufacturing. 2: because dma transfers use the cpu data bus, this time is dependent on other functions on the bus. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 499 dspic33epxxxgm3xx/6xx/7xx 34.0 high-temperature el ectrical characteristics this section provides an overview of dspic33epxxxgm3xx/6 xx/7xx electrical characteristics for devices operating in an ambient temperature range of -40c to +150c. the specifications between -40c to +150c are identical to those shown in section 33.0 electrical characteristics for operation between -40c to +125c, with the exception of the parameters listed in this section. parameters in this section begin with an h, which denotes high temperature. for example, parameter dc10 in section 33.0 electrical characteristics is the industrial and extended temperature equivalent of hdc10 . absolute maximum ratings for the dspic33epxxxgm3xx/6xx/7xx high-temperature devices are listed below. exposure to these maximum rating conditions for extended periods can affect device reliability. functional operation of the device at these or any other conditions above the parameters indicated in the operation listings of this specification is not implied. absolute maximum ratings ( 1 ) ambient temperature under bias ( 2 ) .........................................................................................................-40c to +150c storage temperature ............................................................................................................ .................. -65c to +160c voltage on v dd with respect to v ss ......................................................................................................... -0.3v to +4.0v voltage on any pin that is not 5v tolerant with respect to v ss ( 3 ) ..................................................... -0.3v to (v dd + 0.3v) voltage on any 5v tolerant pin with respect to v ss when v dd < 3.0v ( 3 ) ..................................................... -0.3v to 3.6v voltage on any 5v tolerant pin with respect to v ss when v dd ? 3.0v ( 3 ) ..................................................... -0.3v to 5.5v maximum current out of v ss pin ........................................................................................................................... ..60 ma maximum current into v dd pin ( 4 ) .............................................................................................................................60 ma maximum junction temperature................................................................................................... .......................... +155c maximum current sourced/sunk by any 4x i/o pin ................................................................................. .................10 ma maximum current sourced/sunk by any 8x i/o pin ................................................................................. .................15 ma maximum current sunk by all ports combined .................................................................................... ....................70 ma maximum current sourced by all ports combined ( 4 ) ................................................................................................70 ma note 1: stresses above those listed under absolute maximum ratings can cause permanent damage to the device. this is a stress rating only, and functional operation of the device at those or any other con ditions above those indicated in the operation listings of this specification is not implied. exposure to maximum rating conditions for extended periods can affect device reliability. 2: aec-q100 reliability testing for devices intended to operate at +150c is 1,000 hours. any design in which the total operating time from +125c to +150c will be greater than 1,000 hours is not warranted without prior written approval from microchip technology inc. 3: refer to the pin diagrams section for 5v tolerant pins. 4: maximum allowable current is a function of device maximum power dissipation (see tab l e 3 4- 2 ). downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 500 ? 2013-2014 microchip technology inc. 34.1 high-temperature dc characteristics table 34-1: operating mips vs. voltage table 34-2: thermal operating conditions table 34-3: dc temperature and voltage specifications table 34-4: dc characteristics: power-down current (i pd ) characteristic v dd range (in volts) temperature range (in c) max mips dspic33epxxxgm3xx/6xx/7xx hdc5 3.0 to 3.6v ( 1 ) -40c to +150c 40 note 1: device is functional at v bormin < v dd < v ddmin . analog modules, such as the adc, may have degraded performance. device functionality is tested but not characterized. rating symbol min typ max unit high-temperature devices operating junction temperature range t j -40 +155 c operating ambient temperature range t a -40 +150 c power dissipation: internal chip power dissipation: p int = v dd x (i dd ? ? i oh ) p d p int + p i / o w i/o pin power dissipation: i/o = ? ({v dd ? v oh } x i oh ) + ? (v ol x i ol ) maximum allowed power dissipation p dmax (t j C t a )/ ? ja w dc characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +150c parameter no. symbol characteristic min typ max units conditions operating voltage hdc10 supply voltage v dd 3.0 3.3 3.6 v -40c to +150c dc characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +150c parameter no. typical max units conditions power-down current (i pd ) hdc60e 4.1 6 ma +150c 3.3v base power-down current (notes 1 , 3 ) hdc61c 15 30 ? a +150c 3.3v watchdog timer current: ? i wdt (notes 2 , 4 ) note 1: base i pd is measured with all peripherals and clocks shut down. all i/os are configured as inputs and pulled to v ss . wdt, etc., are all switched off and vregs (rcon<8>) = 1 . 2: the ? current is the additional current consumed when the module is enabled. this current should be added to the base i pd current. 3: these currents are measured on the device containing the most memory in this family. 4: these parameters are characterized, but are not tested in manufacturing. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 501 dspic33epxxxgm3xx/6xx/7xx table 34-5: dc characteristics: idle current (i idle ) table 34-6: dc characteristics: operating current (i dd ) table 34-7: dc characteristics: doze current (i doze ) dc characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +150c parameter no. typical max units conditions hdc40e 3.6 8 ma +150c 3.3v 10 mips hdc42e 5 15 ma +150c 3.3v 20 mips hdc44e 10 20 ma +150c 3.3v 40 mips dc characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +150c parameter no. typical max units conditions hdc20 11 25 ma +150c 3.3v 10 mips hdc22 15 30 ma +150c 3.3v 20 mips hdc23 21 50 ma +150c 3.3v 40 mips dc characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +150c parameter no. typical max doze ratio units conditions hdc72a 25 45 1:2 ma +150c 3.3v 40 mips hdc72g ( 1 ) 14 33 1:128 ma note 1: parameters with doze ratios of 1:64 and 1:128 are characterized, but are not tested in manufacturing. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 502 ? 2013-2014 microchip technology inc. table 34-8: dc characteristics: i/o pin output specifications dc characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +150c param. symbol characteristic min. typ. max. units conditions hdo10 v ol output low voltage 4x sink driver pins ( 2 ) 0 . 4vi ol ? 5ma, v dd = 3.3v (note 1 ) output low voltage 8x sink driver pins ( 3 ) 0 . 4vi ol ? 8 ma, v dd = 3.3v (note 1 ) hdo20 v oh output high voltage 4x source driver pins ( 2 ) 2.4 v i oh ? -10 ma, v dd = 3.3v (note 1 ) output high voltage 8x source driver pins ( 3 ) 2.4 v i oh ? 15 ma, v dd = 3.3v (note 1 ) hdo20a v oh 1 output high voltage 4x source driver pins ( 2 ) 1.5 v i oh ? -3.9 ma, v dd = 3.3v (note 1 ) 2.0 i oh ? -3.7 ma, v dd = 3.3v (note 1 ) 3.0 i oh ? -2 ma, v dd = 3.3v (note 1 ) output high voltage 8x source driver pins ( 3 ) 1.5 v i oh ? -7.5 ma, v dd = 3.3v (note 1 ) 2.0 i oh ? -6.8 ma, v dd = 3.3v (note 1 ) 3.0 i oh ? -3 ma, v dd = 3.3v (note 1 ) note 1: parameters are characterized, but not tested. 2: includes all i/o pins that are not 8x sink driver pins (see below). 3: includes the following pins: for 44-pin devices: ra3, ra4, ra7, ra9, ra10, rb7, rb<15:9>, rc1 and rc<9:3> for 64-pin devices: ra4, ra7, ra<10:9>, rb7, rb<15:9>, rc1, rc<9:3>, rc15 and rg<8:7> for 100-pin devices: ra4, ra7, ra9, ra10, rb7, rb<15:9>, rc1, rc<9:3>, rc15, rd<3:1> and rg<8:6> table 34-9: dc characteristics: program memory dc characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +150c param. symbol characteristic ( 1 ) min. typ. max. units conditions program flash memory hd130 e p cell endurance 10,000 e/w -40c to +150c ( 2 ) hd134 t retd characteristic retention 20 year 1000 e/w cycles or less and no other specifications are violated note 1: these parameters are assured by design, but are not characterized or tested in manufacturing. 2: programming of the flash memory is allowed up to +150c. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 503 dspic33epxxxgm3xx/6xx/7xx 34.2 ac characteristics and timing parameters the information contained in this section defines dspic33epxxxgm3xx/6xx/7xx ac characteristics and timing parameters for high-temperature devices. however, all ac timing specifications in this section are the same as those in section 33.2 ac characteristics and timing parameters , with the exception of the parameters listed in this section. parameters in this section begin with an h, which denotes high temperature. for example, parameter os53 in section 33.2 ac characteristics and timing parameters is the industrial and extended temperature equivalent of hos53 . table 34-10: temperature and vo ltage specifications C ac figure 34-1: load conditions for device timing specifications ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +150c operating voltage v dd range as described in table 34-1 . v dd /2 c l r l pin pin v ss v ss c l r l =464 ? c l = 50 pf for all pins except osc2 15 pf for osc2 output load condition 1 C for all pins except osc2 load condition 2 C for osc2 downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 504 ? 2013-2014 microchip technology inc. table 34-11: pll clock timing specifications ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +150c param no. symbol characteristic min typ max units conditions hos53 d clk clko stability (jitter) ( 1 ) -5 0.5 5 % measured over 100 ms period note 1: these parameters are characterized by similarity, but are not tested in manufacturing. this specific ation is based on clock cycle by clock cycle measurements. to calculate the effective jitter for indiv idual time bases or communication clocks use this formula: peripheral clock jitter d clk f osc peripheral bit rate clock -------------------------------------------------------------- ?? ?? ----------------------------------------------------------------------- - = for example: f osc = 32 mhz, d clk = 5%, spix bit rate clock (i.e., sckx) is 2 mhz. spi sck jitter d clk 32 mhz 2 mhz -------------------- ?? ?? ----------------------------- - 5% 16 --------- - 5% 4 ------- -1 . 2 5 % == = = table 34-12: internal frc accuracy ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +150c param no. characteristic min typ max units conditions internal frc accuracy @ frc frequency = 7.3728 mhz hf20 frc -3 +3 % -40c ? t a ?? +150c v dd = 3.0-3.6v table 34-13: internal rc accuracy ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +150c param no. characteristic min typ max units conditions lprc @ 32.768 khz ( 1 , 2 ) hf21 lprc -30 +30 % -40c ? t a ?? +150c v dd = 3.0-3.6v note 1: change of lprc frequency as v dd changes. 2: lprc accuracy impacts the watchdog timer time-out period (t wdt 1). see section 30.5 watchdog timer (wdt) for more information. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 505 dspic33epxxxgm3xx/6xx/7xx table 34-14: adcx module spec ifications (12-bit mode) table 34-15: adcx module spec ifications (10-bit mode) ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +150c param no. symbol characteristic min typ max units conditions adc accuracy (12-bit mode) ( 1 ) had20a nr resolution ( 3 ) 12 data bits bits had21a inl integral nonlinearity -6 6 lsb v inl = av ss = v refl = 0v, av dd = v refh = 3.6v had22a dnl differential nonlinearity -1 1 lsb v inl = av ss = v refl = 0v, av dd = v refh = 3.6v had23a g err gain error -10 10 lsb v inl = av ss = v refl = 0v, av dd = v refh = 3.6v had24a e off offset error -5 5 lsb v inl = av ss = v refl = 0v, av dd = v refh = 3.6v dynamic performance (12-bit mode) ( 2 ) had33a f nyq input signal bandwidth 200 khz note 1: these parameters are characterized, but are tested at 20 ksps only. 2: these parameters are characterized by similarity, but are not tested in manufacturing. 3: injection currents > | 0 | can affect the adc results by approximately 4-6 counts. ac characteristics standard operating conditions: 3.0v to 3.6v (unless otherwise stated) operating temperature -40c ? t a ? +150c param no. symbol characteristic min typ max units conditions adc accuracy (10-bit mode) ( 1 ) had20b nr resolution ( 3 ) 10 data bits bits had21b inl integral nonlinearity -1.5 1.5 lsb v inl = av ss = v refl = 0v, av dd = v refh = 3.6v had22b dnl differential nonlinearity -0.25 0.25 lsb v inl = av ss = v refl = 0v, av dd = v refh = 3.6v had23b g err gain error -2.5 2.5 lsb v inl = av ss = v refl = 0v, av dd = v refh = 3.6v had24b e off offset error -1.25 1.25 lsb v inl = av ss = v refl = 0v, av dd = v refh = 3.6v dynamic performance (10-bit mode) ( 2 ) had33b f nyq input signal bandwidth 400 khz note 1: these parameters are characterized, but are tested at 20 ksps only. 2: these parameters are characterized by similarity, but are not tested in manufacturing. 3: injection currents > | 0 | can affect the adc results by approximately 4-6 counts. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 506 ? 2013-2014 microchip technology inc. notes: downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 507 dspic33epxxxgm3xx/6xx/7xx 35.0 packaging information 35.1 package marking information legend: xx...x customer-specific information y year code (last digit of calendar year) yy year code (last 2 digits of calendar year) ww week code (week of january 1 is week 01) nnn alphanumeric traceability code pb-free jedec designator for matte tin (sn) * this package is pb-free. the pb-free jedec designator ( ) can be found on the outer packaging for this package. note: in the event the full microchip part number cannot be marked on one line, it will be carried over to the next line, thus limiting the number of available characters for customer-specific information. 3 e 3 e xxxxxxxxxx 44-lead qfn (8x8x0.9 mm) xxxxxxxxxx xxxxxxxxxx yywwnnn dspic33ep example 512gm604 1410017 -i/ml 3 e 44-lead tqfp (10x10x1 mm) xxxxxxxxxx xxxxxxxxxx xxxxxxxxxx yywwnnn example dspic33ep 512gm604 -i/ml 64-lead qfn (9x9x0.9 mm) example 3 e xxxxxxxxxxx xxxxxxxxxxx xxxxxxxxxxx yywwnnn dspic33ep 512gm706- -i/mr 1410017 1410017 3 e downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 508 ? 2013-2014 microchip technology inc. 35.1 package marking information (continued) 3 e 64-lead tqfp (10x10x1 mm) xxxxxxxxxx xxxxxxxxxx xxxxxxxxxx yywwnnn example dspic33ep 512gm706 1410017 -i/pt 121-lead tfbga (10x10x1.1 mm) example xxxxxxxxxx xxxxxxxxxx yywwnnn 33ep512gm 710-i/bg 1410017 100-lead tqfp (12x12x1 mm) xxxxxxxxxxxx xxxxxxxxxxxx yywwnnn example dspic33ep512 gm710-i/pt 1410017 3 e 3 e 100-lead tqfp (14x14x1 mm) xxxxxxxxxxxx xxxxxxxxxxxx yywwnnn example dspic33ep512 gm710-i/pf 1410017 3 e downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 509 dspic33epxxxgm3xx/6xx/7xx 35.2 package details 
  
   !"#$ % &  '   !" # $% &" '  ()"&'"!&)  & #*&&  & #    + '% ! & !  
& ,!- '    ' !! #.#&"# '#% !
&"!!#% !
&"!!! & $ #/''
!#   ' !  #&   
.0/ 1+2 1 !' !  &  $ & " !**&"&&   ! .32  %   ' !("!" *&"&&   (%%' &
"
! ! & ' 3& '!&" &
4 # * !(
 ! ! & 
 4  
% & & # & &&
255***'
'5
4  6&! 77.. ' !7'&! 8 89 : 8"') %7 #! 8  7 #& ;1+ 9  <  &  = =  # # 4 4 !!  /  / & #%%  / = / 3&7  & 7 / > / 3&
& 7 .3 3&  ? /? ? 9  @#& . 1+ 9  7  &  1+ # # 4 @#& . 1+ # # 4 7  &  1+ 7 #4 !!   =  7 #@#& )   / # %&  
? ? ? # %&  1&&' ? ? ? a e e1 d d1 e b note 1 note 2 n 123 c a1 l a2 l1 
    * + >1 downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 510 ? 2013-2014 microchip technology inc. note: for the most current package drawings, please see the microchip packaging specification located at http://www.microchip.com/packaging downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 511 dspic33epxxxgm3xx/6xx/7xx downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 512 ? 2013-2014 microchip technology inc. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 513 dspic33epxxxgm3xx/6xx/7xx downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 514 ? 2013-2014 microchip technology inc. note: for the most current package drawings, please see the microchip packaging specification located at http://www.microchip.com/packaging downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 515 dspic33epxxxgm3xx/6xx/7xx note: for the most current package drawings, please see the microchip packaging specification located at http://www.microchip.com/packaging downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 516 ? 2013-2014 microchip technology inc. note: for the most current package drawings, please see the microchip packaging specification located at http://www.microchip.com/packaging downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 517 dspic33epxxxgm3xx/6xx/7xx 0.20 c a-b d 64 x b 0.08 c a-b d c seating plane 4x n/4 tips top view side view for the most current package drawings, please see the microchip packaging specification located at http://www.microchip.com/packaging note: microchip technology drawing c04-085c sheet 1 of 2 64-lead plastic thin quad flatpack (pt)-10x10x1 mm body, 2.00 mm footprint [tqfp] d e e1 d1 d a b 0.20 h a-b d 4x d1/2 e a 0.08 c a1 a2 see detail 1 a a e1/2 note 1 note 2 1 2 3 n 0.05 downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 518 ? 2013-2014 microchip technology inc. for the most current package drawings, please see the microchip packaging specification located at http://www.microchip.com/packaging note: 64-lead plastic thin quad flatpack (pt)-10x10x1 mm body, 2.00 mm footprint [tqfp] 13 12 11 e mold draft angle bottom 13 12 11 d mold draft angle top 0.27 0.22 0.17 b lead width 0.20 - 0.09 c lead thickness 10.00 bsc d1 molded package length 10.00 bsc e1 molded package width 12.00 bsc d overall length 12.00 bsc e overall width 7 3.5 0 i foot angle 0.75 0.60 0.45 l foot length 0.15 - 0.05 a1 standoff 1.05 1.00 0.95 a2 molded package thickness 1.20 - - a overall height 0.50 bsc e lead pitch 64 n number of leads max nom min dimension limits millimeters units footprint l1 1.00 ref 2. chamfers at corners are optional; size may vary. 1. pin 1 visual index feature may vary, but must be located within the hatched area. 4. dimensioning and tolerancing per asme y14.5m bsc: basic dimension. theoretically exact value shown without tolerances. ref: reference dimension, usually without tolerance, for information purposes only. 3. dimensions d1 and e1 do not include mold flash or protrusions. mold flash or protrusions shall not exceed 0.25mm per side. noes: microchip technology drawing c04-085c sheet 2 of 2 l (l1) e c h x x=ab or d e/2 detail 1 section a-a t downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 519 dspic33epxxxgm3xx/6xx/7xx note: for the most current package drawings, please see the microchip packaging specification located at http://www.microchip.com/packaging downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 520 ? 2013-2014 microchip technology inc. 
  
  "" !"#$ % &  '   !" # $% &" '  ()"&'"!&)  & #*&&  & #    + '% ! & !  
& ,!- '    ' !! #.#&"# '#% !
&"!!#% !
&"!!! & $ #/''
!#   ' !  #&   
.0/ 1+2 1 !' !  &  $ & " !**&"&&   ! .32  %   ' !("!" *&"&&   (%%' &
"
! ! & ' 3& '!&" &
4 # * !(
 ! ! & 
 4  
% & & # & &&
255***'
'5
4  6&! 77.. ' !7'&! 8 89 : 8"') %7 #! 8  7 #& 1+ 9  <  &  = =  # # 4 4 !!  /  / & #%%  / = / 3&7  & 7 / > / 3&
& 7 .3 3&  ? /? ? 9  @#& . 1+ 9  7  &  1+ # # 4 @#& . 1+ # # 4 7  &  1+ 7 #4 !!   =  7 #@#& )  ;  # %&  
? ? ? # %&  1&&' ? ? ? d d1 e e1 e b n 123 note 1 note 2 c l a1 l1 a a2 
    * + 1 downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 521 dspic33epxxxgm3xx/6xx/7xx note: for the most current package drawings, please see the microchip packaging specification located at http://www.microchip.com/packaging downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 522 ? 2013-2014 microchip technology inc. 
  
   !"#$ % &  '   !" # $% &" '  ()"&'"!&)  & #*&&  & #    + '% ! & !  
& ,!- '    ' !! #.#&"# '#% !
&"!!#% !
&"!!! & $ #/''
!#   ' !  #&   
.0/ 1+2 1 !' !  &  $ & " !**&"&&   ! .32  %   ' !("!" *&"&&   (%%' &
"
! ! & ' 3& '!&" &
4 # * !(
 ! ! & 
 4  
% & & # & &&
255***'
'5
4  6&! 77.. ' !7'&! 8 89 : 8"') %7 #! 8  7 #& /1+ 9  <  &  = =  # # 4 4 !!  /  / & #%%  / = / 3&7  & 7 / > / 3&
& 7 .3 3&  ? /? ? 9  @#& . >1+ 9  7  &  >1+ # # 4 @#& . 1+ # # 4 7  &  1+ 7 #4 !!   =  7 #@#& )    # %&  
? ? ? # %&  1&&' ? ? ? d d1 e b e1 e n note 1 note 2 123 c l a1 l1 a2 a 
    * + 1 downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 523 dspic33epxxxgm3xx/6xx/7xx note: for the most current package drawings, please see the microchip packaging specification located at http://www.microchip.com/packaging downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 524 ? 2013-2014 microchip technology inc. b a 0.10 c 0.10 c (datum b) (datum a) 2x top view side view for the most current package drawings, please see the microchip packaging specification located at http://www.microchip.com/packaging note: note 1 microchip technology drawing c04-148 rev f sheet 1 of 2 d e 2x l k j h g f e dc ba detail b e d1 e1 e a bottom view detail a a1 121-ball plastic thin profile fine pitch ball grid array (bg) - 10x10x1.10 mm body [tfbga] downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 525 dspic33epxxxgm3xx/6xx/7xx microchip technology drawing c04-148 rev f sheet 2 of 2 for the most current package drawings, please see the microchip packaging specification located at http://www.microchip.com/packaging note: 121-ball plastic thin profile fine pitch ball grid array (bg) - dimension limits units d overall width overall length array length array width d1 e1 e millimeters min max 10.00 bsc contact diameter b notes: 1. nom bsc: basic dimension. theoretically exact value shown without tolerances. 2. ref: reference dimension, usually without tolerance, for information purposes only. ball height a1 overall height a contact pitch e 0.80 bsc number of contacts n 121 0.25 0.40 10.00 bsc 1.20 8.00 bsc 8.00 bsc 3. 1.10 1.00 0.30 0.35 nx ?b 0.15 c a b 0.08 c c 0.10 c detail a detail b 0.35 0.45 4. ball interface to package body: 0.37mm nominal diameter. ball a1 visual index feature may vary, but must be located within the hatched area. dimensioning and tolerancing per asme y14.5m. the outer rows and colums of balls are located with respect to datums a and b. 10x10x1.10 mm body [tfbga] downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 526 ? 2013-2014 microchip technology inc. downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 527 dspic33epxxxgm3xx/6xx/7xx appendix a: revision history revision a (february 2013) this is the initial released version of this document. revision b (june 2013) changes to section 5.0 flash program memory , register 5-1 . changes to section 6.0 resets , figure 6-1 . changes to section 26.0 op amp/com- parator module , register 26-2 . updates to most of the tables in section 33.0 electrical characteristics . minor text edits throughout the document. revision c (september 2013) changes to figure 23-1 . changes to figure 26-2 . changes to table 30-2 . changes to section 33.0 electrical characteristics . added section 34.0 high-temperature electrical characteristics to the data sheet. minor typographical edits throughout the document. revision d (august 2014) this revision incorporates the following updates: sections: - updated section 2.0 guidelines for getting started with 16-bit digital signal control- lers , section 8.0 direct memory access (dma) , section 10.3 doze mode , section 21.0 controller area network (can) module (dspic33epxxxgm6xx/7xx devices only) , section 23.0 10-bit/12-bit analog-to-digital converter (adc) , section 23.1.2 12-bit adcx configuration , section 21.4 can message buffers , section 35.0 packaging information figures: - updated pin diagrams , figure 1-1 , figure 9-1 registers: - updated register 5-1 , register 8-2 , register 21-1 , register 23-2 tables: - updated ta b l e 1 - 1 , ta bl e 7 - 1 , tab le 8 - 1 , table 34-9 , tab le 1 , tab l e 4 - 2 , table 4-3 , table 4-25 , tab le 4 - 33 , ta bl e 4 - 3 4 , table 4-39 , tab le 4 - 30 , ta bl e 4 - 4 6 , table 4-47 , table 33-16 , tab l e 3 4- 8 downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 528 ? 2013-2014 microchip technology inc. notes: downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 529 dspic33epxxxgm3xx/6xx/7xx index a absolute maximum ratings .............................................. 433 ac characteristics .............................................. ...... 445, 503 10-bit adcx conversion requirements.................... 497 12-bit adcx conversion requirements.................... 495 12cx bus data (master mode) requirements .......... 484 adcx module................................................ ............ 491 adcx module (10-bit mode) ............................. 493, 505 adcx module (12-bit mode) ............................. 492, 505 canx i/o requirements ........................................... 487 capacitive loading requirements on output pins ....................................................... 445 dma module requirements...................................... 498 external clock requirements ................................... 446 high-speed pwmx requirements ............................ 455 i/o requirements............................................. ......... 448 i2cx bus data (slave mode) requirements ............. 486 input capture x (icx) requirements ......................... 453 internal frc accuracy...................................... 447, 504 internal lprc accuracy............................................ 447 internal rc accuracy ................................................ 504 load conditions ............................................... . 445, 503 ocx/pwmx mode requirements.............................. 454 op amp/comparator voltage reference settling time ..................................................... 489 output compare x (ocx) requirements................... 454 pll clock.................................................. ........ 447, 504 qeix external clock requirements .......................... 456 qeix index pulse requirements............................... 458 quadrature decoder requirements.......................... 457 reset, watchdog timer, oscillator start-up timer and power-up timer requirements .................. 450 spi1 master mode (full-duplex, cke = 0, ckp = x, smp = 1) requirements .................... 474 spi1 master mode (full-duplex, cke = 1, ckp = x, smp = 1) requirements .................... 473 spi1 master mode (half-duplex, transmit only) requirements ........................... 472 spi1 slave mode (full-duplex, cke = 0, ckp = 0, smp = 0) requirements .................... 482 spi1 slave mode (full-duplex, cke = 0, ckp = 1, smp = 0) requirements .................... 480 spi1 slave mode (full-duplex, cke = 1, ckp = 0, smp = 0) requirements .................... 476 spi1 slave mode (full-duplex, cke = 1, ckp = 1, smp = 0) requirements .................... 478 spi2, spi3 master mode (full-duplex, cke = 0, ckp = x, smp = 1) requirements .................... 462 spi2, spi3 master mode (full-duplex, cke = 1, ckp = x, smp = 1) requirements .................... 461 spi2, spi3 master mode (half-duplex, transmit only) requirements ........................... 460 spi2, spi3 slave mode (full-duplex, cke = 0, ckp = 0, smp = 0) requirements .................... 470 spi2, spi3 slave mode (full-duplex, cke = 0, ckp = 1, smp = 0) requirements .................... 468 spi2, spi3 slave mode (full-duplex, cke = 1, ckp = 0, smp = 0) requirements .................... 464 spi2, spi3 slave mode (full-duplex, cke = 1, ckp = 1, smp = 0) requirements .................... 466 temperature and voltage specifications .................. 445 timer1 external clock requirements ....................... 451 timer2 and timer4 (type b) external clock requirements ................................................ ... 452 timer3 and timer5 (type c) external clock requirements ................................................ ... 452 uartx i/o requirements......................................... 487 adc 10-bit configuration.................................................. 327 12-bit configuration.................................................. 327 control registers...................................................... 331 helpful tips............................................................... 330 key features ............................................................ 327 assembler mpasm assembler .................................................. 43 0 b bit-reversed addressing example.................................................................... 100 implementation ......................................................... .. 99 sequence table (16-entry) ...................................... 100 block diagrams 16-bit timer1 module .......................................... ..... 211 accessing program memory with table instructions ............................................. 102 adcx conversion clock period................................ 329 adcx with connection options for anx pins and op amps ............................................... .... 328 arbiter architecture ................................................ ..... 95 bemf voltage measured using adc module............ 26 boost converter implementation ................................ 24 call stack frame ..................................................... 96 canx module ............................................... ............ 296 connections for on-chip voltage regulator ............ 416 cpu core ................................................................... 28 crc module .................................................. ........... 405 crc shift engine ..................................................... 406 ctmu module ................................................. ......... 322 data access from program space address generation.......................................... 101 dci module................................................ ............... 343 digital filter interconnect......................................... . 367 dma controller ......................................................... 131 dspic33epxxxgm3xx/6xx/7xx devices................ 15 eds read address generation.................................. 90 eds write address generation.................................. 91 high-speed pwmx architectural overview .............. 231 high-speed pwmx register interconnection diagram .................................. 232 i2cx module ............................................. ................ 282 input capture x module ............................................ 219 interleaved pfc....................................................... ... 26 mclr pin connections ............................................ .. 22 multiphase synchronous buck converter .................. 25 multiplexing remappable output for rpn ................ 171 op amp configuration a.......................................... . 368 op amp configuration b.......................................... . 369 op amp/comparator voltage reference.................. 366 op amp/comparator x module ................................. 365 oscillator system...................................................... 143 output compare x module ....................................... 223 paged data memory space ....................................... 92 peripheral to dma controller.................................... 129 pll ........................................................................... 144 downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 530 ? 2013-2014 microchip technology inc. pmp pinout and connections to external devices ............................................... 395 programmers model................................................ ... 30 ptg module ............................................... ............... 350 qeix module ............................................. ................ 258 recommended minimum connection ......................... 22 remappable input for u1rx ..................................... 166 reset system............................................................ 111 rtcc module ................................................ ........... 384 shared port structure ............................................... 163 single-phase synchronous buck converter ............... 25 spix module............................................. ................. 274 suggested oscillator circuit placement...................... 23 type b timer (timer2/4/6/8) ..................................... 214 type b/type c timer pair (32-bit timer).................. 215 type c timer (timer3/5/7/9)..................................... 214 uartx module.......................................................... 289 user-programmable blanking function .................... 367 watchdog timer (wdt) ......................................... ... 417 brown-out reset (bor) .................................................... 416 c c compilers mplab xc compilers............................................... 430 can module control registers ...................................................... 297 message buffers .............................................. ......... 316 word 0 .............................................................. 316 word 1 .............................................................. 316 word 2 .............................................................. 317 word 3 .............................................................. 317 word 4 .............................................................. 318 word 5 .............................................................. 318 word 6 .............................................................. 319 word 7 .............................................................. 319 modes of operation ............................................. ..... 296 overview ................................................................... 295 can module (can)........................................................... 295 charge time measurement unit (ctmu) ......................... 321 code examples ic1 connection to home1 qei1 digital filter input on pin 43......................................... 166 portb write/read................................................... 164 pwm1 write-protected register unlock sequence.............................................. 230 pwrsav instruction syntax ..................................... 153 code protection ............................................... ......... 411, 418 codeguard security.............................................. .... 411, 418 configuration bits.............................................................. 411 description ................................................................ 413 cpu..................................................................................... 27 addressing modes ................................................. ..... 27 arithmetic logic unit (alu)......................................... 35 control registers ........................................................ 31 data space addressing .............................................. 27 dsp engine ................................................................ 35 instruction set ............................................................. 27 programmers model................................................ ... 29 register descriptions.......................................... 29 ctmu control registers ...................................................... 323 customer change notification service ............................. 536 customer notification service........................................... 536 customer support ............................................... .............. 536 d data address space........................................................... 41 memory map for 128-kbyte devices .......................... 42 memory map for 256-kbyte devices .......................... 43 memory map for 512-kbyte devices .......................... 44 near data space ....................................................... . 41 organization and alignment ....................................... 41 sfr space ............................................................... .. 41 width .......................................................................... 41 data converter interface (dci) module ............................ 343 data memory arbitration and bus master priority ............................. 95 dc characteristics............................................................ 434 brown-out reset (bor)........................................... . 443 ctmu current source .............................................. 490 doze current (i doze )........................................ 439, 501 filter capacitor (c efc ) specifications ...................... 435 high temperature..................................................... 500 i/o pin input specifications................................... .... 440 i/o pin output specifications............................ 443, 502 idle current (i idle ) ............................................ 437, 501 op amp/comparator specifications ......................... 488 op amp/comparator voltage reference specifications.................................. 489 operating current (i dd ) .................................... 436, 501 operating mips vs. voltage ............................. 434, 500 power-down current (i pd )................................ 438, 500 program memory .............................................. 444, 502 temperature and voltage ......................................... 500 temperature and voltage specifications.................. 435 thermal operating conditions.......................... 434, 500 thermal packaging characteristics .......................... 434 dci control registers ...................................................... 344 introduction ............................................ ................... 343 demo/development boards, evaluation and starter kits ............................................ ............. 432 development support ....................................................... 429 third-party tools ...................................................... 432 dma controller channel to peripheral associations.......................... 130 control registers ...................................................... 132 dmaxcnt ........................................................ 132 dmaxcon........................................................ 132 dmaxpad ........................................................ 132 dmaxreq ........................................................ 132 dmaxstal/h ................................................... 132 dmaxstbl/h ................................................... 132 supported peripherals ............................................ .. 129 doze mode ....................................................................... 155 e electrical characteristics ................................... ............... 433 ac..................................................................... 445, 503 equations device operating frequency .................................... 144 f osc calculation ...................................................... 144 f vco calculation ...................................................... 144 errata .................................................................................. 12 downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 531 dspic33epxxxgm3xx/6xx/7xx f flash program memory .................................................... 103 control registers ...................................................... 10 4 operations ................................................................ 104 rtsp operation........................................................ 104 table instructions...................................................... 103 flexible configuration ....................................................... 411 g getting started with 16-bit dscs........................................ 21 connection requirements .......................................... 21 cpu logic filter capacitor connection (v cap ) .......... 22 decoupling capacitors............................................... . 21 external oscillator pins............................................... 23 icsp pins.................................................................... 23 master clear (mclr ) pin............................................ 22 oscillator value conditions on device start-up .......... 24 unused i/os ................................................................ 24 h high-speed pwm ............................................................. 229 control registers ...................................................... 23 3 faults ........................................................................ 229 high-temperature electr ical characteristics..................... 499 absolute maximum ratings ...................................... 499 high-voltage detect (hvd) ........................................... .... 173 i i/o ports ............................................................................ 163 configuring analog/digital port pins......................... 164 helpful tips ............................................................... 173 open-drain configuration ......................................... 164 parallel i/o (pio)....................................................... 163 write/read timing .......................................... .......... 164 in-circuit debugger ........................................... ................ 418 in-circuit emulation........................................................... 411 in-circuit serial programming (icsp) ....................... 411, 418 input capture .............................................. ...................... 219 control registers ...................................................... 22 0 input change notification (icn) ..................................... ... 164 instruction addressing modes......................................... .... 96 file register instructions ............................................ 96 fundamental modes supported.................................. 97 mac instructions......................................................... 97 mcu instructions ........................................................ 96 move and accumulator instructions............................ 97 other instructions........................................................ 97 instruction set overview ................................................................... 422 summary................................................................... 419 interfacing program and data memory spaces ................ 101 inter-integrated circuit (i 2 c).............................................. 281 control registers ...................................................... 28 3 internal lprc oscillator use with wdt ........................................................... 417 internet address................................................................ 536 interrupt controller control and status registers .................................... 120 iecx .................................................................. 120 ifsx .................................................................. 120 intcon1 .......................................................... 120 intcon2 .......................................................... 120 intcon3 .......................................................... 120 intcon4 .......................................................... 120 inttreg .......................................................... 120 ipcx .................................................................. 120 reset sequence ................................................ ....... 115 interrupt vector details (table) ...................................................... ..... 117 interrupt vector table (ivt) .............................................. 115 interrupt vector table (table)..................................... ....... 116 j jtag boundary scan interface ....................................... . 411 jtag interface ................................................................. 418 m memory maps eds ............................................................................ 94 memory organization ............................................ ............. 37 microchip internet web site.............................................. 536 modulo addressing .................................................... ......... 98 applicability................................................................. 99 operation example..................................................... 98 start and end address .............................................. . 98 w address register selection .................................... 98 mplab assembler, linker, librarian................................ 43 0 mplab icd 3 in-circuit debugger ................................... 431 mplab pm3 device programmer .................................... 431 mplab real ice in-circuit emulator system ................ 431 mplab x integrated development environment software ............................................ .. 429 mplab x sim software simulator ................................... 431 mplib object librarian................................................... .. 430 mplink object linker ...................................................... 430 o op amp application considerations ....................................... 368 configuration a................................................. 368 configuration b................................................. 369 op amp/comparator......................................................... 365 control registers...................................................... 370 resources ................................................................ 36 9 oscillator configuration .................................................... 143 cpu clocking system .............................................. 144 output compare ............................................................... 223 control registers...................................................... 224 p packaging ......................................................................... 507 details............................................................... 51 7, 518 marking............................................................. 507 , 508 parallel master port (pmp) ............................................... 395 peripheral module disable (pmd) .................................... 155 peripheral pin select (pps)........................................... ... 165 input sources, maps input to function..................... 167 output selection for remappable pins .................... 172 peripheral trigger generator (ptg) module .................... 349 pickit 3 in-circuit debugger/programmer ........................ 431 pinout i/o descriptions (table)................................... ......... 16 pmp control registers...................................................... 396 power-saving features ................................................ .... 153 clock frequency and switching ............................... 153 instruction-based modes.......................................... 153 idle.................................................................... 154 sleep ................................................................ 154 interrupts coincident with power save instructions ....................................................... 154 pps control registers...................................................... 175 downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 532 ? 2013-2014 microchip technology inc. program address space ..................................................... 37 memory map for dspic33ep128gm3xx/6xx/7xx devices ......... 37 memory map for dspic33ep256gm3xx/6xx/7xx devices ......... 38 memory map for dspic33ep512gm3xx/6xx/7xx devices ......... 39 program memory organization.............................................. .................. 40 reset vector ............................................................... 40 program space address construction................................................ 101 data access from program memory using table instructions.............................................. 102 table read instructions tblrdh............................................................ 102 tblrdl ............................................................ 102 programmable crc control registers ...................................................... 407 overview ................................................................... 406 setup examples........................................................ 406 programmable cyclic redundancy check (crc) generator ................................................ .................. 405 ptg control registers ...................................................... 351 introduction ............................................ ................... 349 output descriptions .................................................. 364 step commands and format.................................... 361 q quadrature encoder interface (qei) ................................. 257 control registers ...................................................... 259 r real-time clock and calender (rtcc)............................ 383 referenced sources ........................................................... 13 register ptgadj (ptg adjust) .............................................. 359 ptgl0 (ptg literal 0) .............................................. 359 ptgqptr (ptg step queue pointer) ..................... 360 ptgquex (ptg step queue x) ............................... 360 register maps adc1 and adc2 .................................................. ....... 66 can1 (when win (c1ctrl) = 0 or 1) ....................... 68 can1 (when win (c1ctrl) = 0) .............................. 68 can1 (when win (c1ctrl) = 1) .............................. 69 can2 (when win (c1ctrl) = 0 or 1) ....................... 70 can2 (when win (c1ctrl) = 0) .............................. 71 can2 (when win (c1ctrl) = 1) .............................. 72 configuration byte .................................................... 412 cpu core.................................................................... 46 ctmu.......................................................................... 82 dci.............................................................................. 65 dma controller ........................................................... 83 i2c1 and i2c2 ............................................ ................. 63 input capture 1-8 ............................................. ........... 53 interrupt controller (dspic33epxxxgm3xx devices) ..................... 50 interrupt controller (dspic33epxxxgm6xx/7xx devices).............. 48 jtag interface ............................................................ 82 nvm ............................................................................ 78 op amp/comparator ................................................... 81 output compare ......................................................... 54 pad configuration ....................................................... 89 parallel master/slave port .......................................... 79 peripheral pin select input (dspic33epgm60x/7xx devices)..................... 76 peripheral pin select input (dspic33epxxxgm3xx devices) ..................... 77 peripheral pin select output (dspic33epxxxgm304/604 devices) ............... 74 peripheral pin select output (dspic33epxxxgm306/706 devices) ............... 74 peripheral pin select output (dspic33epxxxgm310/710 devices) ............... 75 pmd (dspic33epxxxgm3xx devices) .................... 80 pmd (dspic33epxxxgm6xx/7xx devices) ............ 79 porta (dspic33epxxxgm304/604 devices).......... 84 porta (dspic33epxxxgm306/706 devices).......... 84 porta (dspic33epxxxgm310/710 devices).......... 84 portb (dspic33epxxxgm304/604 devices).......... 85 portb (dspic33epxxxgm306/706 devices).......... 85 portb (dspic33epxxxgm310/710 devices).......... 85 portc (dspic33epxxxgm304/604 devices) ......... 86 portc (dspic33epxxxgm306/706 devices) ......... 86 portc (dspic33epxxxgm310/710 devices) ......... 86 portd (dspic33epxxxgm306/706 devices) ......... 87 portd (dspic33epxxxgm310/710 devices) ......... 87 porte (dspic33epxxxgm306/706 devices).......... 88 porte (dspic33epxxxgm310/710 devices).......... 87 portf (dspic33epxxxgm306/706 devices).......... 88 portf (dspic33epxxxgm310/710 devices).......... 88 portg (dspic33epxxxgm306/706 devices) ......... 89 portg (dspic33epxxxgm310/710 devices) ......... 89 programmable crc ................................................... 73 ptg ............................................................................ 56 pwm .................................................................... ....... 57 pwm generator 1............................................. .......... 57 pwm generator 2............................................. .......... 58 pwm generator 3............................................. .......... 58 pwm generator 4............................................. .......... 59 pwm generator 5............................................. .......... 59 pwm generator 6............................................. .......... 60 qei1 ........................................................................... 61 qei2 ........................................................................... 62 real-time clock and calendar................................... 82 reference clock ......................................................... 78 spi1, spi2 and spi3 ....................................... ........... 64 system control ........................................................... 7 8 timers......................................................................... 52 uart1 and uart2 ............................................ ........ 63 uart3 and uart4 ............................................ ........ 64 registers adxchs0 (adcx input channel 0 select) ............... 338 adxchs123 (adcx input channel 1, 2, 3 select) ..................................... 337 adxcon1 (adcx control 1)..................................... 331 adxcon2 (adcx control 2)..................................... 333 adxcon3 (adcx control 3)..................................... 335 adxcon4 (adcx control 4)..................................... 336 adxcssh (adcx input scan select high)............... 340 adxcssl (adcx input scan select low) ................ 342 alcfgrpt (alarm configuration) ........................... 388 alrmval (alarm minutes and seconds value, alrmptr = 00) ............................................... 393 alrmval (alarm month and day value, alrmptr = 10) ............................................... 391 alrmval (alarm weekday and hours value, alrmptr = 01) ............................................... 392 altdtrx (pwmx alternate dead-time).................. 246 downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 533 dspic33epxxxgm3xx/6xx/7xx auxconx (pwmx auxiliary control)........................ 254 chop (pwmx chop clock generator)..................... 241 clkdiv (clock divisor)............................................. 148 cm4con (op amp/comparator 4 control) .............. 373 cmstat (op amp/comparator status) ................... 370 cmxcon (op amp/comparator x control, x = 1, 2, 3 or 5) .................................... 371 cmxfltr (comparator x filter control)................... 379 cmxmskcon (comparator x mask gating control) ................................................. 377 cmxmsksrc (comparator x mask source select control) .................................................. 375 corcon (core control) .................................... 33, 122 crccon1 (crc control 1) ..................................... 407 crccon2 (crc control 2) ..................................... 408 crcxorh (crc xor polynomial high)................. 409 crcxorl (crc xor polynomial low) .................. 409 ctmucon1 (ctmu control register 1).................. 323 ctmucon2 (ctmu control register 2).................. 324 ctmuicon (ctmu current control) ....................... 326 cvr1con (comparator voltage reference control 1) ........................................ 380 cvr2con (comparator voltage reference control 2) ........................................ 381 cxbufpnt1 (canx filters 0-3 buffer pointer 1)................................................ 306 cxbufpnt2 (canx filters 4-7 buffer pointer 2)................................................ 307 cxbufpnt3 (canx filters 8-11 buffer pointer 3)................................................ 307 cxbufpnt4 (canx filters 12-15 buffer pointer 4)................................................ 308 cxcfg1 (canx baud rate configuration 1)............ 304 cxcfg2 (canx baud rate configuration 2)............ 305 cxctrl1 (canx control 1)...................................... 297 cxctrl2 (canx control 2)...................................... 298 cxec (canx transmit/receive error count) ........... 304 cxfctrl (canx fifo control) ............................... 300 cxfen1 (canx acceptance filter enable 1)............ 306 cxfifo (canx fifo status) .................................... 301 cxfmsksel1 (canx filters 7-0 mask selection 1) ............................................. 310 cxfmsksel2 (canx filters 15-8 mask selection 2) ............................................. 311 cxinte (canx interrupt enable) .............................. 303 cxintf (canx interrupt flag) .................................. 302 cxrxfneid (canx acceptance filter n extended identifier).......................................... . 309 cxrxfnsid (canx acceptance filter n standard identifier) ........................................... 309 cxrxful1 (canx receive buffer full 1)................. 313 cxrxful2 (canx receive buffer full 2)................. 313 cxrxmneid (canx acceptance filter mask n extended identifier).......................................... . 312 cxrxmnsid (canx acceptance filter mask n standard identifier) ........................................... 312 cxrxovf1 (canx receive buffer overflow 1)........ 314 cxrxovf2 (canx receive buffer overflow 2)........ 314 cxtrmncon (canx tx/rx buffer mn control) ...... 315 cxvec (canx interrupt code) ................................. 299 dcicon1 (dci control 1)......................................... 344 dcicon2 (dci control 2)......................................... 345 dcicon3 (dci control 3)......................................... 346 dcistat (dci status).............................................. 347 devid (device id) .................................................... 415 devrev (device revision)...................................... 415 dmalca (dma last channel active status) ........... 140 dmapps (dma ping-pong status) .......................... 141 dmapwc (dma peripheral write collision status)................................................ 138 dmarqc (dma request collision status) .............. 139 dmaxcnt (dma channel x transfer count) ........... 136 dmaxcon (dma channel x control)....................... 132 dmaxpad (dma channel x peripheral address).......................................... 136 dmaxreq (dma channel x irq select) ................. 133 dmaxstah (dma channel x start address a, high)...................................... 134 dmaxstal (dma channel x start address a, low)....................................... 134 dmaxstbh (dma channel x start address b, high)...................................... 135 dmaxstbl (dma channel x start address b, low)....................................... 135 dsadrh (dma most recent ram high address)................................................... 137 dsadrl (dma most recent ram low address).................................................... 137 dtrx (pwmx dead-time)........................................ 246 fclconx (pwmx fault current-limit control)........ 250 i2cxcon (i2cx control)........................................... 283 i2cxmsk (i2cx slave mode address mask)............ 287 i2cxstat (i2cx status) ........................................... 285 icxcon1 (input capture x control 1)....................... 220 icxcon2 (input capture x control 2)....................... 221 indxxcnth (index counter x high word) .............. 267 indxxcntl (index counter x low word)................ 267 indxxhld (index counter x hold)........................... 268 intcon1 (interrupt control 1) ................................. 123 intcon2 (interrupt control 2) ................................. 125 intcon3 (interrupt control 3) ................................. 126 intcon4 (interrupt control 4) ................................. 126 inttreg (interrupt control and status) .................. 127 intxhldh (interval timerx hold high word)........... 272 intxhldl (interval timerx hold low word) ............ 272 intxtmrh (interval timerx high word) .................. 271 intxtmrl (interval timerx low word).................... 271 ioconx (pwmx i/o control).................................... 248 lebconx (leading-edge blanking control x) ......... 252 lebdlyx (leading-edge blanking delay x) ............ 253 mdc (pwmx master duty cycle) ............................. 241 nvmadr (nonvolatile memory lower address)...... 107 nvmadru (nonvolatile memory upper address) ................................................ 107 nvmcon (nonvolatile memory (nvm) control) ...... 105 nvmkey (nonvolatile memory key) ........................ 108 nvmsrcadrh (nonvolatile data memory upper address) ................................................ 108 nvmsrcadrl (nonvolatile data memory lower address) ................................................ 109 ocxcon1 (output compare x control 1) ................ 224 ocxcon2 (output compare x control 2) ................ 226 osccon (oscillator control)................................... 1 46 osctun (frc oscillator tuning)............................ 151 padcfg1 (pad configuration control)............ 387, 403 pdcx (pwmx generator duty cycle)....................... 244 phasex (pwmx primary phase-shift)..................... 245 pllfbd (pll feedback divisor) ............................. 150 pmaddr (parallel master port address) ................. 400 pmaen (parallel master port address enable) ....... 401 downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 534 ? 2013-2014 microchip technology inc. pmcon (parallel master port control) ..................... 396 pmd1 (peripheral module disable control 1) ........... 156 pmd2 (peripheral module disable control 2) ........... 158 pmd3 (peripheral module disable control 3) ........... 159 pmd4 (peripheral module disable control 4) ........... 161 pmd6 (peripheral module disable control 6) ........... 161 pmd7 (peripheral module disable control 7) ........... 162 pmmode (parallel master port mode) ..................... 398 pmstat (parallel master port status) ..................... 402 posxcnth (position counter x high word) ............ 265 posxcntl (position counter x low word) ............. 265 posxhld (position counter x hold) ........................ 266 ptcon (pwmx time base control)......................... 233 ptcon2 (pwmx primary master clock divider select 2)............................................................ 235 ptgbte (ptg broadcast trigger enable) ............... 354 ptgc0lim (ptg counter 0 limit) ............................ 357 ptgc1lim (ptg counter 1 limit) ............................ 358 ptgcon (ptg control) ........................................... 353 ptgcst (ptg control/status) ................................. 351 ptghold (ptg hold) ............................................. 358 ptgsdlim (ptg step delay limit).......................... 357 ptgt0lim (ptg timer0 limit) ................................. 356 ptgt1lim (ptg timer1 limit) ................................. 356 ptper (pwmx primary master time base period) ............................................ 236 pwmcapx (pwmx primary time base capture).......................................... 255 pwmconx (pwmx control) ..................................... 242 qeixcon (qeix control) .......................................... 259 qeixgech (qeix greater than or equal compare high word) ........................................ 270 qeixgecl (qeix greater than or equal compare low word)......................................... 270 qeixich (qeix initialization/capture high word)........................................................ 268 qeixicl (qeix initialization/capture low word)......................................................... 268 qeixioc (qeix i/o control)...................................... 261 qeixlech (qeix less than or equal compare high word) ........................................ 269 qeixlecl (qeix less than or equal compare low word)......................................... 269 qeixstat (qeix status) .......................................... 263 rcfgcal (rtcc calibration and configuration) ............................................ 386 rcon (reset control) .............................................. 112 refocon (reference oscillator control)................ 152 rpinr0 (peripheral pin select input 0) .................... 175 rpinr1 (peripheral pin select input 1) .................... 176 rpinr10 (peripheral pin select input 10) ................ 181 rpinr11 (peripheral pin select input 11) ................ 182 rpinr12 (peripheral pin select input 12) ................ 183 rpinr14 (peripheral pin select input 14) ................ 184 rpinr15 (peripheral pin select input 15) ................ 185 rpinr16 (peripheral pin select input 16) ................ 186 rpinr17 (peripheral pin select input 17) ................ 187 rpinr18 (peripheral pin select input 18) ................ 188 rpinr19 (peripheral pin select input 19) ................ 188 rpinr22 (peripheral pin select input 22) ................ 189 rpinr23 (peripheral pin select input 23) ................ 190 rpinr24 (peripheral pin select input 24) ................ 191 rpinr25 (peripheral pin select input 25)................ 192 rpinr26 (peripheral pin select input 26)................ 193 rpinr27 (peripheral pin select input 27)................ 194 rpinr28 (peripheral pin select input 28)................ 195 rpinr29 (peripheral pin select input 29)................ 196 rpinr3 (peripheral pin select input 3).................... 177 rpinr30 (peripheral pin select input 30)................ 197 rpinr37 (peripheral pin select input 37)................ 198 rpinr38 (peripheral pin select input 38)................ 199 rpinr39 (peripheral pin select input 39)................ 200 rpinr40 (peripheral pin select input 40)................ 201 rpinr41 (peripheral pin select input 41)................ 202 rpinr7 (peripheral pin select input 7).................... 178 rpinr8 (peripheral pin select input 8).................... 179 rpinr9 (peripheral pin select input 9).................... 180 rpor0 (peripheral pin select output 0).................. 203 rpor1 (peripheral pin select output 1).................. 203 rpor10 (peripheral pin select output 10).............. 208 rpor11 (peripheral pin select output 11).............. 208 rpor12 (peripheral pin select output 12).............. 209 rpor2 (peripheral pin select output 2).................. 204 rpor3 (peripheral pin select output 3).................. 204 rpor4 (peripheral pin select output 4).................. 205 rpor5 (peripheral pin select output 5).................. 205 rpor6 (peripheral pin select output 6).................. 206 rpor7 (peripheral pin select output 7).................. 206 rpor8 (peripheral pin select output 8).................. 207 rpor9 (peripheral pin select output 9).................. 207 rscon (dci receive slot control) ......................... 348 rtcval (minutes and seconds value, rtcptr = 00).................................................. 390 rtcval (month and day value, rtcptr = 10).................................................. 389 rtcval (weekday and hours value, rtcptr = 01).................................................. 390 rtcval (year value, rtcptr = 11)...................... 389 sdcx (pwmx secondary duty cycle)...................... 244 sevtcmp (pwmx primary special event compare)................................... 236 sphasex (pwmx secondary phase-shift).............. 245 spixcon1 (spix control 1)...................................... 278 spixcon2 (spix control 2)...................................... 280 spixstat (spix status and control) ....................... 276 sr (cpu status)............................................. 31, 121 ssevtcmp (pwmx secondary special event compare)................................... 240 stcon (pwmx secondary time base control) ...... 237 stcon2 (pwmx secondary master clock divider select 2) ........................................................... 239 stper (pwmx secondary master time base period)............................................ 24 0 t1con (timer1 control) .......................................... 212 trgconx (pwmx trigger control) ......................... 247 trigx (pwmx primary trigger compare value)...... 249 tscon (dci transmit slot control)......................... 348 txcon (t2con, t4con, t6con and t8con control)................................................ 216 tycon (t3con, t5con, t7con and t9con control)................................................ 217 uxmode (uartx mode).......................................... 291 uxsta (uartx status and control)......................... 293 velxcnt (velocity counter x) ................................. 266 downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 535 dspic33epxxxgm3xx/6xx/7xx resets............................................................................... 111 brown-out reset (bor) ............................................ 111 configuration mismatch reset (cm)......................... 111 illegal condition reset (iopuwr)............................ 111 illegal address mode ........................................ 111 illegal opcode .............................................. ..... 111 security............................................................. 111 uninitialized w register.................................... 111 master clear pin reset (mclr ) ............................... 111 master reset signal (sysrst )................................ 111 power-on reset (por) ............................................. 111 reset instruction (swr)......................................... 111 trap conflict reset (trapr).................................... 111 watchdog timer time-out reset (wdto)................ 111 revision history ................................................................ 527 rtcc control registers ...................................................... 38 6 resources................................................................. 385 writing to the timer................................................... 385 s serial peripheral interface (spi) ....................................... 273 special features of the cpu ............................................ 411 spi control registers ...................................................... 27 6 helpful tips ............................................................... 275 symbols used in opcode descriptions............................. 420 t temperature and voltage specifications ac ............................................................................. 503 timer control registers ...................................................... 21 6 timer1 ............................................................................... 211 control register ........................................................ 212 timer2/3, timer4/5, timer6/7 and timer8/9 ..................... 213 timing diagrams 10-bit adc1 conversion (chps<1:0> = 01, simsam = 0, asam = 0, ssrc<2:0> = 000, ssrcg = 0)...................................................... 496 10-bit adc1 conversion (chps<1:0> = 01, simsam = 0, asam = 1, ssrc<2:0> = 111, ssrcg = 0, samc<4:0> = 00010) .................. 496 12-bit adc1 conversion (asam = 0, ssrc<2:0> = 000, ssrcg = 0) ...................... 494 bor and master clear reset ................................... 448 canx i/o................................................................... 487 external clock........................................................... 446 high-speed pwmx ................................................... 455 high-speed pwmx fault .......................................... 455 i/o characteristics .................................................... 448 i2cx bus data (master mode) .................................. 483 i2cx bus data (slave mode) ................................... . 485 i2cx bus start/stop bits (master mode) ................... 483 i2cx bus start/stop bits (slave mode) ..................... 485 input capture x (icx)........................................... ...... 453 load conditions ............................................... ......... 490 ocx/pwmx ............................................................... 454 output compare x (ocx) .......................................... 454 power-on reset characteristics ............................... 449 qeax/qebx input......................................... ............ 457 qeix index pulse........................................ .............. 458 spi1 master mode (full-duplex, cke = 0, ckp = x, smp = 1) ........................................... 474 spi1 master mode (full-duplex, cke = 1, ckp = x, smp = 1) ........................................... 473 spi1 master mode (half-duplex, transmit only, cke = 0)........................................................... 471 spi1 master mode (half-duplex, transmit only, cke = 1)........................................................... 472 spi1 slave mode (full-duplex, cke = 0, ckp = 0, smp = 0) ........................................... 481 spi1 slave mode (full-duplex, cke = 0, ckp = 1, smp = 0) ........................................... 479 spi1 slave mode (full-duplex, cke = 1, ckp = 0, smp = 0) ........................................... 475 spi1 slave mode (full-duplex, cke = 1, ckp = 1, smp = 0) ........................................... 477 spi2, spi3 master mode (full-duplex, cke = 0, ckp = x, smp = 1)............................ 462 spi2, spi3 master mode (full-duplex, cke = 1, ckp = x, smp = 1)............................ 461 spi2, spi3 master mode (half-duplex, transmit only, cke = 0) .................................. 459 spi2, spi3 master mode (half-duplex, transmit only, cke = 1) .................................. 460 spi2, spi3 slave mode (full-duplex, cke = 0, ckp = 0, smp = 0) ........................... 469 spi2, spi3 slave mode (full-duplex, cke = 0, ckp = 1, smp = 0) ........................... 467 spi2, spi3 slave mode (full-duplex, cke = 1, ckp = 0, smp = 0) ........................... 463 spi2, spi3 slave mode (full-duplex, cke = 1, ckp = 1, smp = 0) ........................... 465 timer1-timer5 external clock .................................. 451 timerq (qeix module) external clock ..................... 456 uartx i/o ................................................................ 487 timing specifications i2cx bus data requirements (master mode)........... 484 i2cx bus data requirements (slave mode)............. 486 u uart control registers...................................................... 291 helpful tips............................................................... 290 universal asynchronous receiver transmitter (uart) .................................................. 289 user id words .................................................................. 41 6 v voltage regulator (on-chip) ............................................ 416 w watchdog timer (wdt)............................................ 411, 417 programming considerations ................................... 417 www address ................................................................. 536 www, on-line support ................... .................................. 12 downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 536 ? 2013-2014 microchip technology inc. notes: downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 537 dspic33epxxxgm3xx/6xx/7xx the microchip web site microchip provides online support via our www site at www.microchip.com . this web site is used as a means to make files and information easily available to customers. accessible by using your favorite internet browser, the web site contains the following information: product support C data sheets and errata, application notes and sample programs, design resources, users guides and hardware support documents, latest software releases and archived software general technical support C frequently asked questions (faq), technical support requests, online discussion groups, microchip consultant program member listing business of microchip C product selector and ordering guides, latest microchip press releases, listing of seminars and events, listings of microchip sales offices, distributors and factory representatives customer change notification service microchips customer notification service helps keep customers current on microchip products. subscribers will receive e-mail notification whenever there are changes, updates, revisions or errata related to a specified product family or development tool of interest. to register, access the microchip web site at www.microchip.com . under support, click on customer change notification and follow the registration instructions. customer support users of microchip products can receive assistance through several channels: distributor or representative local sales office field application engineer (fae) technical support customers should contact their distributor, representative or field application engineer (fae) for support. local sales offices are also available to help customers. a listing of sales offices and locations is included in the back of this document. technical support is available through the web site at: http://microchip.com/support downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 538 ? 2013-2014 microchip technology inc. notes: downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 539 dspic33epxxxgm3xx/6xx/7xx product identification system to order or obtain information, e. g., on pricing or delivery, refer to the factory or the listed sales office . microchip trademark architecture core family program memory size (kbytes) product group pin count temperature range package pattern ds pic 33 ep 512 gm7 10 t - i / pt x xx tape and reel flag (if applicable) architecture: 33 = 16-bit digital signal controller family: ep = enhanced performance product group: gm7 = general purpose plus motor control family pin count: 04 = 44-pin 06 = 64-pin 10 = 100/124-pin temperature range: i=- 4 0 ? c to +85 ? c (industrial) e=-40 ? c to +125 ? c (extended) package: bg = plastic thin profile ball grid array - (121-pin) 10x10 mm body (tfbga) ml = plastic quad, no lead package - (44-pin) 8x8 mm body (qfn) mr = plastic quad, no lead package - (64-pin) 9x9 mm body (qfn) pt = plastic thin quad flatpack - (44-pin) 10x10 mm body (tqfp) pt = plastic thin quad flatpack - (64-pin) 10x10 mm body (tqfp) pt = thin quad flatpack - (100-pin) 12x12x1 mm body (tqfp) pf = thin quad flatpack - (100-pin) 14x14x1 mm body (tqfp) example: dspic33ep512gm710-i/pt: dspic33, enhanced performance, 512-kbyte program memory, 100-pin, industrial temperature, tqfp package. downloaded from: http:///
dspic33epxxxgm3xx/6xx/7xx ds70000689d-page 540 ? 2013-2014 microchip technology inc. notes: downloaded from: http:///
? 2013-2014 microchip technology inc. ds70000689d-page 541 information contained in this publication regarding device applications and the like is provided only for your convenience and may be superseded by updates. it is your responsibility to ensure that your application meets with your specifications. microchip makes no representations or warranties of any kind whether express or implied, written or oral, statutory or otherwise, related to the information, including but not limited to its condition, quality, performance, merchantability or fitness for purpose . microchip disclaims all liability arising from this information and its use. use of microchip devices in life support and/or safety applications is entirely at the buyers risk, and the buyer agrees to defend, indemnify and hold harmless microchip from any and all damages, claims, suits, or expenses resulting from such use. no licenses are conveyed, implicitly or otherwise, under any microchip intellectual property rights. trademarks the microchip name and logo, the microchip logo, dspic, flashflex, flexpwr, jukeblox, k ee l oq , k ee l oq logo, kleer, lancheck, medialb, most, most logo, mplab, optolyzer, pic, picstart, pic 32 logo, righttouch, spynic, sst, sst logo, superflash and uni/o are registered trademarks of microchip tec hnology incorporated in the u.s.a. and other countries. the embedded control solutions company and mtouch are registered trademarks of microchip technology incorporated in the u.s.a. analog-for-the-digital age, bodycom, chipkit, chipkit logo, codeguard, dspicdem, dspicdem.net, ecan, in-circuit serial programming, icsp, inter-chip connectivity, kleernet, kleernet logo, miwi, mpasm, mpf, mplab certified logo, mplib, mplink, multitrak, netdetach, omniscient code generation, picdem, picdem.net, pickit, pictail, righttouch logo, real ice, sqi, serial quad i/o, total endurance, tsharc, usbcheck, varisense, viewspan, wiperlock, wireless dna, and zena are trademarks of microchip technology incorporated in the u.s.a. and other countries. sqtp is a service mark of microchip technology incorporated in the u.s.a. silicon storage technology is a registered trademark of microchip technology inc. in other countries. gestic is a registered trademar ks of microchip technology germany ii gmbh & co. kg, a subsidiary of microchip technology inc., in other countries. all other trademarks mentioned herein are property of their respective companies. ? 2013-2014, microchip technology incorporated, printed in the u.s.a., all rights reserved. isbn: 978-1-63276-507-9 note the following details of the code protection feature on microchip devices: microchip products meet the specification cont ained in their particular microchip data sheet. microchip believes that its family of products is one of the most secure families of its kind on the market today, when used i n the intended manner and under normal conditions. there are dishonest and possibly illegal methods used to breach the code protection feature. all of these methods, to our knowledge, require using the microchip products in a manner outside the operating specif ications contained in microchips data sheets. most likely, the person doing so is engaged in theft of intellectual property. microchip is willing to work with the customer who is concerned about the integrity of their code. neither microchip nor any other semiconduc tor manufacturer can guarantee the security of their code. code protection does not mean that we are guaranteeing the product as unbreakable. code protection is constantly evolving. we at microchip are co mmitted to continuously improvin g the code protection features of our products. attempts to break microchips code protection feature may be a violation of the digital millennium copyright act. if such acts allow unauthorized access to your software or other copyrighted work, you may have a right to sue for relief under that act. microchip received iso/ts-16949:2009 certification for its worldwide headquarters, design and wafer fabrication facilities in chandler and tempe, arizona; gresham, oregon and design centers in california and india. the company?s quality system processes and procedures are for its pic ? mcus and dspic ? dscs, k ee l oq ? code hopping devices, serial eeproms, microperipherals, nonvolatile memory an d analog products. in addition, microchip?s quality system for the design and manufacture of development systems is iso 9001:2000 certified. quality management s ystem certified by dnv == iso/ts 16949 == downloaded from: http:///
ds70000689d-page 542 ? 2013-2014 microchip technology inc. americas corporate office 2355 west chandler blvd. chandler, az 85224-6199 tel: 480-792-7200 fax: 480-792-7277 technical support: http://www.microchip.com/ support web address: www.microchip.com atlanta duluth, ga tel: 678-957-9614 fax: 678-957-1455 austin, tx tel: 512-257-3370 boston westborough, ma tel: 774-760-0087 fax: 774-760-0088 chicago itasca, il tel: 630-285-0071 fax: 630-285-0075 cleveland independence, oh tel: 216-447-0464 fax: 216-447-0643 dallas addison, tx tel: 972-818-7423 fax: 972-818-2924 detroit novi, mi tel: 248-848-4000 houston, tx tel: 281-894-5983 indianapolis noblesville, in tel: 317-773-8323 fax: 317-773-5453 los angeles mission viejo, ca tel: 949-462-9523 fax: 949-462-9608 new york, ny tel: 631-435-6000 san jose, ca tel: 408-735-9110 canada - toronto tel: 905-673-0699 fax: 905-673-6509 asia/pacific asia pacific office suites 3707-14, 37th floor tower 6, the gateway harbour city, kowloon hong kong tel: 852-2943-5100 fax: 852-2401-3431 australia - sydney tel: 61-2-9868-6733 fax: 61-2-9868-6755 china - beijing tel: 86-10-8569-7000 fax: 86-10-8528-2104 china - chengdu tel: 86-28-8665-5511 fax: 86-28-8665-7889 china - chongqing tel: 86-23-8980-9588 fax: 86-23-8980-9500 china - hangzhou tel: 86-571-8792-8115 fax: 86-571-8792-8116 china - hong kong sar tel: 852-2943-5100 fax: 852-2401-3431 china - nanjing tel: 86-25-8473-2460 fax: 86-25-8473-2470 china - qingdao tel: 86-532-8502-7355 fax: 86-532-8502-7205 china - shanghai tel: 86-21-5407-5533 fax: 86-21-5407-5066 china - shenyang tel: 86-24-2334-2829 fax: 86-24-2334-2393 china - shenzhen tel: 86-755-8864-2200 fax: 86-755-8203-1760 china - wuhan tel: 86-27-5980-5300 fax: 86-27-5980-5118 china - xian tel: 86-29-8833-7252 fax: 86-29-8833-7256 china - xiamen tel: 86-592-2388138 fax: 86-592-2388130 china - zhuhai tel: 86-756-3210040 fax: 86-756-3210049 asia/pacific india - bangalore tel: 91-80-3090-4444 fax: 91-80-3090-4123 india - new delhi tel: 91-11-4160-8631 fax: 91-11-4160-8632 india - pune tel: 91-20-3019-1500 japan - osaka tel: 81-6-6152-7160 fax: 81-6-6152-9310 japan - tokyo tel: 81-3-6880- 3770 fax: 81-3-6880-3771 korea - daegu tel: 82-53-744-4301 fax: 82-53-744-4302 korea - seoul tel: 82-2-554-7200 fax: 82-2-558-5932 or 82-2-558-5934 malaysia - kuala lumpur tel: 60-3-6201-9857 fax: 60-3-6201-9859 malaysia - penang tel: 60-4-227-8870 fax: 60-4-227-4068 philippines - manila tel: 63-2-634-9065 fax: 63-2-634-9069 singapore tel: 65-6334-8870 fax: 65-6334-8850 taiwan - hsin chu tel: 886-3-5778-366 fax: 886-3-5770-955 taiwan - kaohsiung tel: 886-7-213-7830 taiwan - taipei tel: 886-2-2508-8600 fax: 886-2-2508-0102 thailand - bangkok tel: 66-2-694-1351 fax: 66-2-694-1350 europe austria - wels tel: 43-7242-2244-39 fax: 43-7242-2244-393 denmark - copenhagen tel: 45-4450-2828 fax: 45-4485-2829 france - paris tel: 33-1-69-53-63-20 fax: 33-1-69-30-90-79 germany - dusseldorf tel: 49-2129-3766400 germany - munich tel: 49-89-627-144-0 fax: 49-89-627-144-44 germany - pforzheim tel: 49-7231-424750 italy - milan tel: 39-0331-742611 fax: 39-0331-466781 italy - venice tel: 39-049-7625286 netherlands - drunen tel: 31-416-690399 fax: 31-416-690340 poland - warsaw tel: 48-22-3325737 spain - madrid tel: 34-91-708-08-90 fax: 34-91-708-08-91 sweden - stockholm tel: 46-8-5090-4654 uk - wokingham tel: 44-118-921-5800 fax: 44-118-921-5820 worldwide sales and service 03/25/14 downloaded from: http:///


▲Up To Search▲   

 
Price & Availability of DSPIC33EP128GM710

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X